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

Unified Diff: base/i18n/time_formatting.cc

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Addressed comments Created 3 years, 10 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 | « base/i18n/time_formatting.h ('k') | base/i18n/time_formatting_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/time_formatting.cc
diff --git a/base/i18n/time_formatting.cc b/base/i18n/time_formatting.cc
index 3f560ee55620ef1833fc07bc0092b614a7132a1d..ea62a34f51618cd65db89a97db7ac1057dfa2b7d 100644
--- a/base/i18n/time_formatting.cc
+++ b/base/i18n/time_formatting.cc
@@ -171,6 +171,11 @@ string16 TimeFormatFriendlyDate(const Time& time) {
return TimeFormat(formatter.get(), time);
}
+string16 TimeFormatWithPattern(const Time& time, const char* pattern) {
+ icu::SimpleDateFormat formatter = CreateSimpleDateFormatter(pattern);
+ return TimeFormat(&formatter, time);
+}
+
string16 TimeDurationFormat(const TimeDelta time,
const DurationFormatWidth width) {
UErrorCode status = U_ZERO_ERROR;
« no previous file with comments | « base/i18n/time_formatting.h ('k') | base/i18n/time_formatting_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698