diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-06 12:33:08 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-06 12:33:08 +0100 |
commit | cb1744dae641e3bbab13e88312f1df0e8f5af2b4 (patch) | |
tree | 635fbd375a85ce3bdc6fbc02443a910b8bc18d20 /indra/llcommon | |
parent | 8780c59894ce79fe354f55d204a3067556c7e710 (diff) | |
parent | 6d1b8925163e347215a44ec094f974aa860ff35f (diff) |
merge from viewer-release
Diffstat (limited to 'indra/llcommon')
-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 2693c0e22b..faf7aa51f1 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -758,6 +758,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 @@ -1127,6 +1128,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); |