summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-08-12 10:10:09 -0700
committerRichard Linden <none@none>2010-08-12 10:10:09 -0700
commit73952a37ed7a11331154f2f68050286722ec96da (patch)
tree7ce6c9f6d0c3f6b0e85efc57736340106329beb4 /indra/llcommon/llstring.cpp
parente16c1f6fdd300f284f0b39b76b4e82f7366b5cdb (diff)
parent402e2a181831d30a6a2586fd4b0641ba66da99be (diff)
Automated merge with http://10.1.4.28:8000/
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp6
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);