Chromium Code Reviews| Index: base/i18n/time_formatting.h |
| diff --git a/base/i18n/time_formatting.h b/base/i18n/time_formatting.h |
| index f8d616f08445e0b72cda1cc8842064e4875fc7b2..ff3b818e3c332dfac6378a826be5fec6b7d5d2d9 100644 |
| --- a/base/i18n/time_formatting.h |
| +++ b/base/i18n/time_formatting.h |
| @@ -75,6 +75,14 @@ BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time); |
| // "Monday, March 6, 2008". |
| BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); |
| +// Formats a time using a skeleton to produce a format for different locales |
| +// when unusual time format is needed, e.g. |
| +// "Feb. 2, 18:00". |
| +// |
| +// See http://userguide.icu-project.org/formatparse/datetime for details. |
| +BASE_I18N_EXPORT string16 TimeFormatWithPattern(const Time& time, |
| + const char* pattern); |
|
jungshik at Google
2017/01/23 21:43:24
Perhaps, add a unit test?
jiahuiguo
2017/01/26 05:46:12
Done.
|
| + |
| // Formats a time duration of hours and minutes into various formats, e.g., |
| // "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details. |
| // |