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

Side by Side Diff: base/time_format.h

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 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_TIME_FORMAT_H_ 8 #ifndef BASE_TIME_FORMAT_H_
9 #define BASE_TIME_FORMAT_H_ 9 #define BASE_TIME_FORMAT_H_
10 10
11 #include <string> 11 #include <string>
12 12
13 namespace base {
14
13 class Time; 15 class Time;
14 16
15 namespace base {
16
17 // Returns the time of day, e.g., "3:07 PM". 17 // Returns the time of day, e.g., "3:07 PM".
18 std::wstring TimeFormatTimeOfDay(const Time& time); 18 std::wstring TimeFormatTimeOfDay(const base::Time& time);
brettw 2008/10/24 23:47:52 Don't but base:: in this file, since the whole thi
19 19
20 // Returns a shortened date, e.g. "Nov 7, 2007" 20 // Returns a shortened date, e.g. "Nov 7, 2007"
21 std::wstring TimeFormatShortDate(const Time& time); 21 std::wstring TimeFormatShortDate(const base::Time& time);
22 22
23 // Returns a numeric date such as 12/13/52. 23 // Returns a numeric date such as 12/13/52.
24 std::wstring TimeFormatShortDateNumeric(const Time& time); 24 std::wstring TimeFormatShortDateNumeric(const base::Time& time);
25 25
26 // Formats a time in a friendly sentence format, e.g. 26 // Formats a time in a friendly sentence format, e.g.
27 // "Monday, March 6, 2008 2:44:30 PM". 27 // "Monday, March 6, 2008 2:44:30 PM".
28 std::wstring TimeFormatShortDateAndTime(const Time& time); 28 std::wstring TimeFormatShortDateAndTime(const base::Time& time);
29 29
30 // Formats a time in a friendly sentence format, e.g. 30 // Formats a time in a friendly sentence format, e.g.
31 // "Monday, March 6, 2008 2:44:30 PM". 31 // "Monday, March 6, 2008 2:44:30 PM".
32 std::wstring TimeFormatFriendlyDateAndTime(const Time& time); 32 std::wstring TimeFormatFriendlyDateAndTime(const base::Time& time);
33 33
34 // Formats a time in a friendly sentence format, e.g. 34 // Formats a time in a friendly sentence format, e.g.
35 // "Monday, March 6, 2008". 35 // "Monday, March 6, 2008".
36 std::wstring TimeFormatFriendlyDate(const Time& time); 36 std::wstring TimeFormatFriendlyDate(const base::Time& time);
37 37
38 } // namespace base 38 } // namespace base
39 39
40 #endif // BASE_TIME_FORMAT_H_ 40 #endif // BASE_TIME_FORMAT_H_
41
OLDNEW
« no previous file with comments | « base/time.cc ('k') | base/time_format.cc » ('j') | base/waitable_event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698