Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1015)

Unified Diff: base/i18n/time_formatting.h

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Add date formatter based on pattern Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/i18n/time_formatting.cc » ('j') | components/autofill/core/browser/credit_card.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
//
« no previous file with comments | « no previous file | base/i18n/time_formatting.cc » ('j') | components/autofill/core/browser/credit_card.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698