| Index: base/i18n/time_formatting.h
|
| diff --git a/base/i18n/time_formatting.h b/base/i18n/time_formatting.h
|
| index f8d616f08445e0b72cda1cc8842064e4875fc7b2..f79473da0a129632b56181205c374f7ad9ffffcb 100644
|
| --- a/base/i18n/time_formatting.h
|
| +++ b/base/i18n/time_formatting.h
|
| @@ -8,6 +8,7 @@
|
| #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"
|
|
|
| @@ -76,28 +77,31 @@ BASE_I18N_EXPORT string16 TimeFormatFriendlyDateAndTime(const Time& time);
|
| BASE_I18N_EXPORT string16 TimeFormatFriendlyDate(const Time& time);
|
|
|
| // Formats a time duration of hours and minutes into various formats, e.g.,
|
| -// "3:07" or "3 hours, 7 minutes". See DurationFormatWidth for details.
|
| +// "3:07" or "3 hours, 7 minutes", and returns true on success. See
|
| +// DurationFormatWidth for details.
|
| //
|
| // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
|
| // can possibly be larger than 24h, as the hour value will be cut below 24
|
| // after formatting.
|
| // TODO(chengx): fix function output when width = DURATION_WIDTH_NUMERIC
|
| // (http://crbug.com/675791)
|
| -BASE_I18N_EXPORT string16 TimeDurationFormat(const TimeDelta time,
|
| - const DurationFormatWidth width);
|
| +BASE_I18N_EXPORT bool TimeDurationFormat(const TimeDelta time,
|
| + const DurationFormatWidth width,
|
| + string16* out) WARN_UNUSED_RESULT;
|
|
|
| // Formats a time duration of hours, minutes and seconds into various formats,
|
| -// e.g., "3:07:30" or "3 hours, 7 minutes, 30 seconds". See DurationFormatWidth
|
| -// for details.
|
| +// e.g., "3:07:30" or "3 hours, 7 minutes, 30 seconds", and returns true on
|
| +// success. See DurationFormatWidth for details.
|
| //
|
| // Please don't use width = DURATION_WIDTH_NUMERIC when the time duration
|
| // can possibly be larger than 24h, as the hour value will be cut below 24
|
| // after formatting.
|
| // TODO(chengx): fix function output when width = DURATION_WIDTH_NUMERIC
|
| // (http://crbug.com/675791)
|
| -BASE_I18N_EXPORT string16
|
| -TimeDurationFormatWithSeconds(const TimeDelta time,
|
| - const DurationFormatWidth width);
|
| +BASE_I18N_EXPORT bool TimeDurationFormatWithSeconds(
|
| + const TimeDelta time,
|
| + const DurationFormatWidth width,
|
| + string16* out) WARN_UNUSED_RESULT;
|
|
|
| // Gets the hour clock type of the current locale. e.g.
|
| // k12HourClock (en-US).
|
|
|