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

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

Issue 2607043002: [Autofill] Credit Card Autofill Last Used Date Experiment (Closed)
Patch Set: Addressed comments Created 3 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 | « no previous file | 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 TimeFormatShortDateAndTimeWithTimeZone(const Time& time); 80 TimeFormatShortDateAndTimeWithTimeZone(const Time& time);
81 81
82 // Formats a time in a friendly sentence format, e.g. 82 // Formats a time in a friendly sentence format, e.g.
83 // "Monday, March 6, 2008 2:44:30 PM". 83 // "Monday, March 6, 2008 2:44:30 PM".
84 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time); 84 BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time);
85 85
86 // Formats a time in a friendly sentence format, e.g. 86 // Formats a time in a friendly sentence format, e.g.
87 // "Monday, March 6, 2008". 87 // "Monday, March 6, 2008".
88 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time); 88 BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
89 89
90 // Formats a time using a skeleton to produce a format for different locales
91 // when an unusual time format is needed, e.g. "Feb. 2, 18:00".
92 //
93 // See http://userguide.icu-project.org/formatparse/datetime for details.
94 BASE_I18N_EXPORT string16 TimeFormatWithPattern(const Time& time,
95 const char* pattern);
96
90 // Formats a time duration of hours and minutes into various formats, e.g., 97 // Formats a time duration of hours and minutes into various formats, e.g.,
91 // "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details. 98 // "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details.
92 // 99 //
93 // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration 100 // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
94 // can possibly be larger than 24h, as the hour value will be cut below 24 101 // can possibly be larger than 24h, as the hour value will be cut below 24
95 // after formatting. 102 // after formatting.
96 // TODO(chengx): fix function output when width = DURATION_WIDTH_NUMERIC 103 // TODO(chengx): fix function output when width = DURATION_WIDTH_NUMERIC
97 // (http://crbug.com/675791) 104 // (http://crbug.com/675791)
98 BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta time, 105 BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta time,
99 const DurationFormatWidth width); 106 const DurationFormatWidth width);
(...skipping 18 matching lines...) Expand all
118 DateFormat format); 125 DateFormat format);
119 126
120 // Gets the hour clock type of the current locale. e.g. 127 // Gets the hour clock type of the current locale. e.g.
121 // k12HourClock (en-US). 128 // k12HourClock (en-US).
122 // k24HourClock (en-GB). 129 // k24HourClock (en-GB).
123 BASE_I18N_EXPORT HourClockType GetHourClockType(); 130 BASE_I18N_EXPORT HourClockType GetHourClockType();
124 131
125 } // namespace base 132 } // namespace base
126 133
127 #endif // BASE_I18N_TIME_FORMATTING_H_ 134 #endif // BASE_I18N_TIME_FORMATTING_H_
OLDNEW
« no previous file with comments | « no previous file | base/i18n/time_formatting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698