2
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
* The contents of this file are subject to the Netscape Public
5
* License Version 1.1 (the "License"); you may not use this file
6
* except in compliance with the License. You may obtain a copy of
7
* the License at http://www.mozilla.org/NPL/
9
* Software distributed under the License is distributed on an "AS
10
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11
* implied. See the License for the specific language governing
12
* rights and limitations under the License.
14
* The Original Code is mozilla.org code.
16
* The Initial Developer of the Original Code is Netscape
17
* Communications Corporation. Portions created by Netscape are
18
* Copyright (C) 1998 Netscape Communications Corporation. All
23
#ifndef nsIDateTimeFormat_h__
24
#define nsIDateTimeFormat_h__
27
#include "nsISupports.h"
30
#include "nsILocale.h"
31
#include "nsIScriptableDateFormat.h"
36
// {2BBAA0B0-A591-11d2-9119-006008A6EDF6}
37
#define NS_IDATETIMEFORMAT_IID \
38
{ 0x2bbaa0b0, 0xa591, 0x11d2, \
39
{ 0x91, 0x19, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
42
// Locale sensitive date and time format interface
44
class nsIDateTimeFormat : public nsISupports {
47
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDATETIMEFORMAT_IID)
49
// performs a locale sensitive date formatting operation on the time_t parameter
50
NS_IMETHOD FormatTime(nsILocale* locale,
51
const nsDateFormatSelector dateFormatSelector,
52
const nsTimeFormatSelector timeFormatSelector,
53
const time_t timetTime,
54
nsString& stringOut) = 0;
56
// performs a locale sensitive date formatting operation on the struct tm parameter
57
NS_IMETHOD FormatTMTime(nsILocale* locale,
58
const nsDateFormatSelector dateFormatSelector,
59
const nsTimeFormatSelector timeFormatSelector,
60
const struct tm* tmTime,
61
nsString& stringOut) = 0;
63
// performs a locale sensitive date formatting operation on the PRTime parameter
64
NS_IMETHOD FormatPRTime(nsILocale* locale,
65
const nsDateFormatSelector dateFormatSelector,
66
const nsTimeFormatSelector timeFormatSelector,
68
nsString& stringOut) = 0;
70
// performs a locale sensitive date formatting operation on the PRExplodedTime parameter
71
NS_IMETHOD FormatPRExplodedTime(nsILocale* locale,
72
const nsDateFormatSelector dateFormatSelector,
73
const nsTimeFormatSelector timeFormatSelector,
74
const PRExplodedTime* explodedTime,
75
nsString& stringOut) = 0;
78
#endif /* nsIDateTimeFormat_h__ */