intl/locale/public/nsIDateTimeFormat.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1
michael@0 2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 3 *
michael@0 4 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7 #ifndef nsIDateTimeFormat_h__
michael@0 8 #define nsIDateTimeFormat_h__
michael@0 9
michael@0 10
michael@0 11 #include "nsISupports.h"
michael@0 12 #include "nscore.h"
michael@0 13 #include "nsStringGlue.h"
michael@0 14 #include "nsILocale.h"
michael@0 15 #include "nsIScriptableDateFormat.h"
michael@0 16 #include "prtime.h"
michael@0 17 #include <time.h>
michael@0 18
michael@0 19
michael@0 20 // {2BBAA0B0-A591-11d2-9119-006008A6EDF6}
michael@0 21 #define NS_IDATETIMEFORMAT_IID \
michael@0 22 { 0x2bbaa0b0, 0xa591, 0x11d2, \
michael@0 23 { 0x91, 0x19, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
michael@0 24
michael@0 25
michael@0 26 // Locale sensitive date and time format interface
michael@0 27 //
michael@0 28 class nsIDateTimeFormat : public nsISupports {
michael@0 29
michael@0 30 public:
michael@0 31 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATETIMEFORMAT_IID)
michael@0 32
michael@0 33 // performs a locale sensitive date formatting operation on the time_t parameter
michael@0 34 NS_IMETHOD FormatTime(nsILocale* locale,
michael@0 35 const nsDateFormatSelector dateFormatSelector,
michael@0 36 const nsTimeFormatSelector timeFormatSelector,
michael@0 37 const time_t timetTime,
michael@0 38 nsAString& stringOut) = 0;
michael@0 39
michael@0 40 // performs a locale sensitive date formatting operation on the struct tm parameter
michael@0 41 NS_IMETHOD FormatTMTime(nsILocale* locale,
michael@0 42 const nsDateFormatSelector dateFormatSelector,
michael@0 43 const nsTimeFormatSelector timeFormatSelector,
michael@0 44 const struct tm* tmTime,
michael@0 45 nsAString& stringOut) = 0;
michael@0 46
michael@0 47 // performs a locale sensitive date formatting operation on the PRTime parameter
michael@0 48 NS_IMETHOD FormatPRTime(nsILocale* locale,
michael@0 49 const nsDateFormatSelector dateFormatSelector,
michael@0 50 const nsTimeFormatSelector timeFormatSelector,
michael@0 51 const PRTime prTime,
michael@0 52 nsAString& stringOut) = 0;
michael@0 53
michael@0 54 // performs a locale sensitive date formatting operation on the PRExplodedTime parameter
michael@0 55 NS_IMETHOD FormatPRExplodedTime(nsILocale* locale,
michael@0 56 const nsDateFormatSelector dateFormatSelector,
michael@0 57 const nsTimeFormatSelector timeFormatSelector,
michael@0 58 const PRExplodedTime* explodedTime,
michael@0 59 nsAString& stringOut) = 0;
michael@0 60 };
michael@0 61
michael@0 62 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDateTimeFormat, NS_IDATETIMEFORMAT_IID)
michael@0 63
michael@0 64 #endif /* nsIDateTimeFormat_h__ */

mercurial