|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
|
2 // Use of this source code is governed by a BSD-style license that can be |
|
3 // found in the LICENSE file. |
|
4 |
|
5 // Basic time formatting methods. These methods use the current locale |
|
6 // formatting for displaying the time. |
|
7 |
|
8 #ifndef BASE_TIME_FORMAT_H_ |
|
9 #define BASE_TIME_FORMAT_H_ |
|
10 |
|
11 #include <string> |
|
12 |
|
13 namespace base { |
|
14 |
|
15 class Time; |
|
16 |
|
17 // Returns the time of day, e.g., "3:07 PM". |
|
18 std::wstring TimeFormatTimeOfDay(const Time& time); |
|
19 |
|
20 // Returns a shortened date, e.g. "Nov 7, 2007" |
|
21 std::wstring TimeFormatShortDate(const Time& time); |
|
22 |
|
23 // Returns a numeric date such as 12/13/52. |
|
24 std::wstring TimeFormatShortDateNumeric(const Time& time); |
|
25 |
|
26 // Formats a time in a friendly sentence format, e.g. |
|
27 // "Monday, March 6, 2008 2:44:30 PM". |
|
28 std::wstring TimeFormatShortDateAndTime(const Time& time); |
|
29 |
|
30 // Formats a time in a friendly sentence format, e.g. |
|
31 // "Monday, March 6, 2008 2:44:30 PM". |
|
32 std::wstring TimeFormatFriendlyDateAndTime(const Time& time); |
|
33 |
|
34 // Formats a time in a friendly sentence format, e.g. |
|
35 // "Monday, March 6, 2008". |
|
36 std::wstring TimeFormatFriendlyDate(const Time& time); |
|
37 |
|
38 } // namespace base |
|
39 |
|
40 #endif // BASE_TIME_FORMAT_H_ |