summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-06-03 01:41:25 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-06-03 02:10:30 +0300
commit6354a053e366e1b6228c45a5dc9f92b262862dbe (patch)
tree72d72b9eea87ee9aebf4e3dc77e2ad0d83a00cec /indra/newview/llpanelprofile.cpp
parent3efe64619b772ce8cab596d7e74de48dcc7f6c20 (diff)
SL-15312 Show user's sl birthday
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index f608712133..cb10dd75fb 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1238,12 +1238,20 @@ void LLPanelProfileSecondLife::fillRightsData()
void LLPanelProfileSecondLife::fillNameAgeData(const LLAvatarName &av_name, const LLDate &born_on)
{
- LLStringUtil::format_map_t args;
- args["[AGE]"] = LLDateUtil::ageFromDate(born_on, LLDate::now());
- args["[NAME]"] = av_name.getAccountName();
- std::string register_date = getString("NameAgeFormat", args);
- getChild<LLUICtrl>("user_name_age")->setValue(register_date);
getChild<LLUICtrl>("display_name")->setValue(av_name.getDisplayName());
+
+ std::string name_and_date = getString("name_date_format");
+ LLSD args_name;
+ args_name["datetime"] = (S32)born_on.secondsSinceEpoch();
+ args_name["[NAME]"] = av_name.getAccountName();
+ LLStringUtil::format(name_and_date, args_name);
+ getChild<LLUICtrl>("user_name_date")->setValue(name_and_date);
+
+ std::string register_date = getString("age_format");
+ LLSD args_age;
+ args_age["[AGE]"] = LLDateUtil::ageFromDate(born_on, LLDate::now());
+ LLStringUtil::format(register_date, args_age);
+ getChild<LLUICtrl>("user_age")->setValue(register_date);
}
void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)