ipc/chromium/src/base/time_format.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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
     3 // found in the LICENSE file.
     5 // Basic time formatting methods.  These methods use the current locale
     6 // formatting for displaying the time.
     8 #ifndef BASE_TIME_FORMAT_H_
     9 #define BASE_TIME_FORMAT_H_
    11 #include <string>
    13 namespace base {
    15 class Time;
    17 // Returns the time of day, e.g., "3:07 PM".
    18 std::wstring TimeFormatTimeOfDay(const Time& time);
    20 // Returns a shortened date, e.g. "Nov 7, 2007"
    21 std::wstring TimeFormatShortDate(const Time& time);
    23 // Returns a numeric date such as 12/13/52.
    24 std::wstring TimeFormatShortDateNumeric(const Time& time);
    26 // Formats a time in a friendly sentence format, e.g.
    27 // "Monday, March 6, 2008 2:44:30 PM".
    28 std::wstring TimeFormatShortDateAndTime(const Time& time);
    30 // Formats a time in a friendly sentence format, e.g.
    31 // "Monday, March 6, 2008 2:44:30 PM".
    32 std::wstring TimeFormatFriendlyDateAndTime(const Time& time);
    34 // Formats a time in a friendly sentence format, e.g.
    35 // "Monday, March 6, 2008".
    36 std::wstring TimeFormatFriendlyDate(const Time& time);
    38 }  // namespace base
    40 #endif  // BASE_TIME_FORMAT_H_

mercurial