123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- #ifndef BASE_I18N_TIME_FORMATTING_H_
- #define BASE_I18N_TIME_FORMATTING_H_
- #include "base/compiler_specific.h"
- #include "base/i18n/base_i18n_export.h"
- #include "base/strings/string16.h"
- namespace base {
- class Time;
- class TimeDelta;
- enum HourClockType {
- k12HourClock,
- k24HourClock,
- };
- enum AmPmClockType {
- kDropAmPm,
- kKeepAmPm,
- };
- enum DurationFormatWidth {
- DURATION_WIDTH_WIDE,
- DURATION_WIDTH_SHORT,
- DURATION_WIDTH_NARROW,
- DURATION_WIDTH_NUMERIC
- };
- enum DateFormat {
-
- DATE_FORMAT_YEAR_MONTH,
-
- DATE_FORMAT_MONTH_WEEKDAY_DAY,
- };
- BASE_I18N_EXPORT string16 TimeFormatTimeOfDay(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithMilliseconds(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatTimeOfDayWithHourClockType(
- const Time& time,
- HourClockType type,
- AmPmClockType ampm);
- BASE_I18N_EXPORT string16 TimeFormatShortDate(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatShortDateNumeric(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatShortDateAndTime(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatMonthAndYear(const Time& time);
- BASE_I18N_EXPORT string16
- TimeFormatShortDateAndTimeWithTimeZone(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
- BASE_I18N_EXPORT string16 TimeFormatWithPattern(const Time& time,
- const char* pattern);
- BASE_I18N_EXPORT bool TimeDurationFormat(const TimeDelta time,
- const DurationFormatWidth width,
- string16* out) WARN_UNUSED_RESULT;
- BASE_I18N_EXPORT bool TimeDurationFormatWithSeconds(
- const TimeDelta time,
- const DurationFormatWidth width,
- string16* out) WARN_UNUSED_RESULT;
- BASE_I18N_EXPORT string16 DateIntervalFormat(const Time& begin_time,
- const Time& end_time,
- DateFormat format);
- BASE_I18N_EXPORT HourClockType GetHourClockType();
- }
- #endif
|