2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsDateTimeFormatMac_h__
8 #define nsDateTimeFormatMac_h__
12 #include "nsIDateTimeFormat.h"
15 class nsDateTimeFormatMac
: public nsIDateTimeFormat
{
18 NS_DECL_THREADSAFE_ISUPPORTS
20 // performs a locale sensitive date formatting operation on the time_t parameter
21 NS_IMETHOD
FormatTime(nsILocale
* locale
,
22 const nsDateFormatSelector dateFormatSelector
,
23 const nsTimeFormatSelector timeFormatSelector
,
24 const time_t timetTime
,
25 nsAString
& stringOut
);
27 // performs a locale sensitive date formatting operation on the struct tm parameter
28 NS_IMETHOD
FormatTMTime(nsILocale
* locale
,
29 const nsDateFormatSelector dateFormatSelector
,
30 const nsTimeFormatSelector timeFormatSelector
,
31 const struct tm
* tmTime
,
32 nsAString
& stringOut
);
33 // performs a locale sensitive date formatting operation on the PRTime parameter
34 NS_IMETHOD
FormatPRTime(nsILocale
* locale
,
35 const nsDateFormatSelector dateFormatSelector
,
36 const nsTimeFormatSelector timeFormatSelector
,
38 nsAString
& stringOut
);
40 // performs a locale sensitive date formatting operation on the PRExplodedTime parameter
41 NS_IMETHOD
FormatPRExplodedTime(nsILocale
* locale
,
42 const nsDateFormatSelector dateFormatSelector
,
43 const nsTimeFormatSelector timeFormatSelector
,
44 const PRExplodedTime
* explodedTime
,
45 nsAString
& stringOut
);
47 nsDateTimeFormatMac() {}
50 virtual ~nsDateTimeFormatMac() {}
53 // init this interface to a specified locale
54 NS_IMETHOD
Initialize(nsILocale
* locale
);
58 bool mUseDefaultLocale
;
61 #endif /* nsDateTimeFormatMac_h__ */