diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-07-28 12:15:32 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-07-28 12:15:32 -0700 |
commit | 0b9327df241e1a5a4693c690810ce8c330e196ad (patch) | |
tree | 1bdff29f5e3de1764410a7bf706763d4a35ebe8b /indra/newview/lldateutil.h | |
parent | 75452dd7a8f9f51bf3fbcb871976168f80e0cae0 (diff) | |
parent | b8d5c8993d46dc5b24bc07f721115a174ff918c8 (diff) |
Merge
Diffstat (limited to 'indra/newview/lldateutil.h')
-rw-r--r-- | indra/newview/lldateutil.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/lldateutil.h b/indra/newview/lldateutil.h index 2843a357c9..f027d360f7 100644 --- a/indra/newview/lldateutil.h +++ b/indra/newview/lldateutil.h @@ -69,6 +69,20 @@ namespace LLDateUtil //std::string ageFromDateISO(const std::string& date_string); //std::string ageFromDate(S32 born_year, S32 born_month, S32 born_day, const LLDate& now); + + /** + * Convert a string of a specified date format into seconds since the Epoch. + * + * Many of the format flags are those used by strftime(...), but not all. + * For the full list of supported time format specifiers + * see http://www.boost.org/doc/libs/1_47_0/doc/html/date_time/date_time_io.html#date_time.format_flags + * + * @param format Format characters string. Example: "%A %b %d, %Y" + * @param str Date string containing the time in specified format. + * + * @return Number of seconds since 01/01/1970 UTC. + */ + S32 secondsSinceEpochFromString(const std::string& format, const std::string& str); } #endif |