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

Unified Diff: base/i18n/time_formatting.h

Issue 7054032: Fix ChromeOS clock menu so that it can show 12-hour clock in all locales. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary use of PlatformTest. Created 9 years, 7 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/base.gyp ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »
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 99d1911bed6f648d7056f2bc9a11058a8c0d58a4..85c01694084f5a29838a8b5c8513f81de173bdd1 100644
--- a/base/i18n/time_formatting.h
+++ b/base/i18n/time_formatting.h
@@ -21,14 +21,22 @@ enum HourClockType {
k24HourClock, // Uses 0-23. e.g., "15:07"
};
+// Argument type used to specify whether or not to include AM/PM sign.
+enum AmPmClockType {
+ kDropAmPm, // Drops AM/PM sign. e.g., "3:07"
+ kKeepAmPm, // Keeps AM/PM sign. e.g., "3:07 PM"
+};
+
// Returns the time of day, e.g., "3:07 PM".
string16 TimeFormatTimeOfDay(const Time& time);
// Returns the time of day in the specified hour clock type. e.g.
-// "3:07 PM" (type == k12HourClock).
+// "3:07 PM" (type == k12HourClock, ampm == kKeepAmPm).
+// "3:07" (type == k12HourClock, ampm == kDropAmPm).
// "15:07" (type == k24HourClock).
string16 TimeFormatTimeOfDayWithHourClockType(const Time& time,
- HourClockType type);
+ HourClockType type,
+ AmPmClockType ampm);
// Returns a shortened date, e.g. "Nov 7, 2007"
string16 TimeFormatShortDate(const Time& time);
@@ -36,8 +44,7 @@ string16 TimeFormatShortDate(const Time& time);
// Returns a numeric date such as 12/13/52.
string16 TimeFormatShortDateNumeric(const Time& time);
-// Formats a time in a friendly sentence format, e.g.
-// "Monday, March 6, 2008 2:44:30 PM".
+// Returns a numeric date and time such as "12/13/52 2:44:30 PM".
string16 TimeFormatShortDateAndTime(const Time& time);
// Formats a time in a friendly sentence format, e.g.
« no previous file with comments | « base/base.gyp ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698