diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-08-20 14:48:00 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-08-20 14:48:00 -0700 |
commit | 5fab3253f941c0e25b4b86e29ab7a34c4325f825 (patch) | |
tree | 8c79b64a284d18a2e316ee3fc881629dff35617d /indra/llcommon/llstring.cpp | |
parent | ab320a12e62152907bbec150972a9ac8a0e244fb (diff) | |
parent | cde71ddc88293a752787b710f6d03aba1ec0b15e (diff) |
Merge from dessie/viewer-release
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r-- | indra/llcommon/llstring.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 2d391839ef..df234c2f00 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -761,6 +761,7 @@ void LLStringOps::setupDatetimeInfo (bool daylight) datetimeToCodes["month"] = "%B"; // August datetimeToCodes["mthnum"] = "%m"; // 08 datetimeToCodes["day"] = "%d"; // 31 + datetimeToCodes["sday"] = "%-d"; // 9 datetimeToCodes["hour24"] = "%H"; // 14 datetimeToCodes["hour"] = "%H"; // 14 datetimeToCodes["hour12"] = "%I"; // 02 @@ -1130,6 +1131,11 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, replacement = LLStringOps::sDayFormat; LLStringUtil::format(replacement, args); } + else if (code == "%-d") + { + struct tm * gmt = gmtime (&loc_seconds); + replacement = llformat ("%d", gmt->tm_mday); // day of the month without leading zero + } else if( !LLStringOps::sAM.empty() && !LLStringOps::sPM.empty() && code == "%p" ) { struct tm * gmt = gmtime (&loc_seconds); |