~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/intl/locale/public/nsIDateTimeFormat.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
3
 *
 
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/
 
8
 *
 
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.
 
13
 *
 
14
 * The Original Code is mozilla.org code.
 
15
 *
 
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
 
19
 * Rights Reserved.
 
20
 *
 
21
 * Contributor(s): 
 
22
 */
 
23
#ifndef nsIDateTimeFormat_h__
 
24
#define nsIDateTimeFormat_h__
 
25
 
 
26
 
 
27
#include "nsISupports.h"
 
28
#include "nscore.h"
 
29
#include "nsString.h"
 
30
#include "nsILocale.h"
 
31
#include "nsIScriptableDateFormat.h"
 
32
#include "prtime.h"
 
33
#include <time.h>
 
34
 
 
35
 
 
36
// {2BBAA0B0-A591-11d2-9119-006008A6EDF6}
 
37
#define NS_IDATETIMEFORMAT_IID \
 
38
{ 0x2bbaa0b0, 0xa591, 0x11d2, \
 
39
{ 0x91, 0x19, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
 
40
 
 
41
 
 
42
// Locale sensitive date and time format interface
 
43
// 
 
44
class nsIDateTimeFormat : public nsISupports {
 
45
 
 
46
public: 
 
47
  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDATETIMEFORMAT_IID)
 
48
 
 
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; 
 
55
 
 
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; 
 
62
 
 
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, 
 
67
                          const PRTime  prTime, 
 
68
                          nsString& stringOut) = 0;
 
69
 
 
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; 
 
76
};
 
77
 
 
78
#endif  /* nsIDateTimeFormat_h__ */