From d88a465a46a3e8cb988e0122cf748882cae367b8 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 19 Apr 2010 17:56:09 +0300 Subject: Fixed bug EXT-6842 ([I18N] Date format in Profile - mm/dd/yyyy needs to be: yyyy/mm/dd for Japanese). - Made avatar registration date localizeable. - Specified localization templates for English, Japanese and German. Reviewed by Mike: https://jira.secondlife.com/browse/EXT-6842 --HG-- branch : product-engine --- indra/newview/lldateutil.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/lldateutil.h') diff --git a/indra/newview/lldateutil.h b/indra/newview/lldateutil.h index 041be07f12..a0df21022e 100644 --- a/indra/newview/lldateutil.h +++ b/indra/newview/lldateutil.h @@ -36,6 +36,29 @@ class LLDate; namespace LLDateUtil { + /** + * Convert a date provided by the server into seconds since the Epoch. + * + * @param[out] date Number of seconds since 01/01/1970 UTC. + * @param[in] str Date string (MM/DD/YYYY) in PDT time zone. + * + * @return true on success, false on parse error + */ + bool dateFromPDTString(LLDate& date, const std::string& str); + + /** + * Get human-readable avatar age. + * + * Used for avatar inspectors and profiles. + * + * @param born_date Date an avatar was born on. + * @param now Current date. + * + * @return human-readable localized string like "1 year, 2 months", + * or "???" on error. + */ + std::string ageFromDate(const LLDate& born_date, const LLDate& now); + // Convert a date provided by the server (MM/DD/YYYY) into a localized, // human-readable age (1 year, 2 months) using translation strings. // Pass LLDate::now() for now. -- cgit v1.2.3