OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Returns a shortened date, e.g. "Nov 7, 2007" | 42 // Returns a shortened date, e.g. "Nov 7, 2007" |
43 BASE_I18N_EXPORT string16 TimeFormatShortDate(const Time& time); | 43 BASE_I18N_EXPORT string16 TimeFormatShortDate(const Time& time); |
44 | 44 |
45 // Returns a numeric date such as 12/13/52. | 45 // Returns a numeric date such as 12/13/52. |
46 BASE_I18N_EXPORT string16 TimeFormatShortDateNumeric(const Time& time); | 46 BASE_I18N_EXPORT string16 TimeFormatShortDateNumeric(const Time& time); |
47 | 47 |
48 // Returns a numeric date and time such as "12/13/52 2:44:30 PM". | 48 // Returns a numeric date and time such as "12/13/52 2:44:30 PM". |
49 BASE_I18N_EXPORT string16 TimeFormatShortDateAndTime(const Time& time); | 49 BASE_I18N_EXPORT string16 TimeFormatShortDateAndTime(const Time& time); |
50 | 50 |
| 51 // Returns a numeric date and time with time zone such as |
| 52 // "12/13/52 2:44:30 PM PST". |
| 53 BASE_I18N_EXPORT string16 |
| 54 TimeFormatShortDateAndTimeWithTimeZone(const Time& time); |
| 55 |
51 // Formats a time in a friendly sentence format, e.g. | 56 // Formats a time in a friendly sentence format, e.g. |
52 // "Monday, March 6, 2008 2:44:30 PM". | 57 // "Monday, March 6, 2008 2:44:30 PM". |
53 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time); | 58 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time); |
54 | 59 |
55 // Formats a time in a friendly sentence format, e.g. | 60 // Formats a time in a friendly sentence format, e.g. |
56 // "Monday, March 6, 2008". | 61 // "Monday, March 6, 2008". |
57 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); | 62 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); |
58 | 63 |
59 // Gets the hour clock type of the current locale. e.g. | 64 // Gets the hour clock type of the current locale. e.g. |
60 // k12HourClock (en-US). | 65 // k12HourClock (en-US). |
61 // k24HourClock (en-GB). | 66 // k24HourClock (en-GB). |
62 BASE_I18N_EXPORT HourClockType GetHourClockType(); | 67 BASE_I18N_EXPORT HourClockType GetHourClockType(); |
63 | 68 |
64 } // namespace base | 69 } // namespace base |
65 | 70 |
66 #endif // BASE_I18N_TIME_FORMATTING_H_ | 71 #endif // BASE_I18N_TIME_FORMATTING_H_ |
OLD | NEW |