michael@0: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: // Basic time formatting methods. These methods use the current locale michael@0: // formatting for displaying the time. michael@0: michael@0: #ifndef BASE_TIME_FORMAT_H_ michael@0: #define BASE_TIME_FORMAT_H_ michael@0: michael@0: #include michael@0: michael@0: namespace base { michael@0: michael@0: class Time; michael@0: michael@0: // Returns the time of day, e.g., "3:07 PM". michael@0: std::wstring TimeFormatTimeOfDay(const Time& time); michael@0: michael@0: // Returns a shortened date, e.g. "Nov 7, 2007" michael@0: std::wstring TimeFormatShortDate(const Time& time); michael@0: michael@0: // Returns a numeric date such as 12/13/52. michael@0: std::wstring TimeFormatShortDateNumeric(const Time& time); michael@0: michael@0: // Formats a time in a friendly sentence format, e.g. michael@0: // "Monday, March 6, 2008 2:44:30 PM". michael@0: std::wstring TimeFormatShortDateAndTime(const Time& time); michael@0: michael@0: // Formats a time in a friendly sentence format, e.g. michael@0: // "Monday, March 6, 2008 2:44:30 PM". michael@0: std::wstring TimeFormatFriendlyDateAndTime(const Time& time); michael@0: michael@0: // Formats a time in a friendly sentence format, e.g. michael@0: // "Monday, March 6, 2008". michael@0: std::wstring TimeFormatFriendlyDate(const Time& time); michael@0: michael@0: } // namespace base michael@0: michael@0: #endif // BASE_TIME_FORMAT_H_