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

Side by Side Diff: base/i18n/time_formatting.h

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « base/i18n/icu_util.cc ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Basic time formatting methods. These methods use the current locale 5 // Basic time formatting methods. These methods use the current locale
6 // formatting for displaying the time. 6 // formatting for displaying the time.
7 7
8 #ifndef BASE_I18N_TIME_FORMATTING_H_ 8 #ifndef BASE_I18N_TIME_FORMATTING_H_
9 #define BASE_I18N_TIME_FORMATTING_H_ 9 #define BASE_I18N_TIME_FORMATTING_H_
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 // Argument type used to specify whether or not to include AM/PM sign. 24 // Argument type used to specify whether or not to include AM/PM sign.
25 enum AmPmClockType { 25 enum AmPmClockType {
26 kDropAmPm, // Drops AM/PM sign. e.g., "3:07" 26 kDropAmPm, // Drops AM/PM sign. e.g., "3:07"
27 kKeepAmPm, // Keeps AM/PM sign. e.g., "3:07 PM" 27 kKeepAmPm, // Keeps AM/PM sign. e.g., "3:07 PM"
28 }; 28 };
29 29
30 // Returns the time of day, e.g., "3:07 PM". 30 // Returns the time of day, e.g., "3:07 PM".
31 BASE_I18N_EXPORT string16 TimeFormatTimeOfDay(const Time& time); 31 BASE_I18N_EXPORT string16 TimeFormatTimeOfDay(const Time& time);
32 32
33 // Returns the time of day in 24-hour clock format with millisecond accuracy,
34 // e.g., "15:07:30.568"
35 BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithMilliseconds(const Time& time);
36
33 // Returns the time of day in the specified hour clock type. e.g. 37 // Returns the time of day in the specified hour clock type. e.g.
34 // "3:07 PM" (type == k12HourClock, ampm == kKeepAmPm). 38 // "3:07 PM" (type == k12HourClock, ampm == kKeepAmPm).
35 // "3:07" (type == k12HourClock, ampm == kDropAmPm). 39 // "3:07" (type == k12HourClock, ampm == kDropAmPm).
36 // "15:07" (type == k24HourClock). 40 // "15:07" (type == k24HourClock).
37 BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithHourClockType( 41 BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithHourClockType(
38 const Time& time, 42 const Time& time,
39 HourClockType type, 43 HourClockType type,
40 AmPmClockType ampm); 44 AmPmClockType ampm);
41 45
42 // Returns a shortened date, e.g. "Nov 7, 2007" 46 // Returns a shortened date, e.g. "Nov 7, 2007"
(...skipping 19 matching lines...) Expand all
62 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); 66 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
63 67
64 // Gets the hour clock type of the current locale. e.g. 68 // Gets the hour clock type of the current locale. e.g.
65 // k12HourClock (en-US). 69 // k12HourClock (en-US).
66 // k24HourClock (en-GB). 70 // k24HourClock (en-GB).
67 BASE_I18N_EXPORT HourClockType GetHourClockType(); 71 BASE_I18N_EXPORT HourClockType GetHourClockType();
68 72
69 } // namespace base 73 } // namespace base
70 74
71 #endif // BASE_I18N_TIME_FORMATTING_H_ 75 #endif // BASE_I18N_TIME_FORMATTING_H_
OLDNEW
« no previous file with comments | « base/i18n/icu_util.cc ('k') | base/i18n/time_formatting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698