michael@0: michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsIDateTimeFormat_h__ michael@0: #define nsIDateTimeFormat_h__ michael@0: michael@0: michael@0: #include "nsISupports.h" michael@0: #include "nscore.h" michael@0: #include "nsStringGlue.h" michael@0: #include "nsILocale.h" michael@0: #include "nsIScriptableDateFormat.h" michael@0: #include "prtime.h" michael@0: #include michael@0: michael@0: michael@0: // {2BBAA0B0-A591-11d2-9119-006008A6EDF6} michael@0: #define NS_IDATETIMEFORMAT_IID \ michael@0: { 0x2bbaa0b0, 0xa591, 0x11d2, \ michael@0: { 0x91, 0x19, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } } michael@0: michael@0: michael@0: // Locale sensitive date and time format interface michael@0: // michael@0: class nsIDateTimeFormat : public nsISupports { michael@0: michael@0: public: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATETIMEFORMAT_IID) michael@0: michael@0: // performs a locale sensitive date formatting operation on the time_t parameter michael@0: NS_IMETHOD FormatTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const time_t timetTime, michael@0: nsAString& stringOut) = 0; michael@0: michael@0: // performs a locale sensitive date formatting operation on the struct tm parameter michael@0: NS_IMETHOD FormatTMTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const struct tm* tmTime, michael@0: nsAString& stringOut) = 0; michael@0: michael@0: // performs a locale sensitive date formatting operation on the PRTime parameter michael@0: NS_IMETHOD FormatPRTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const PRTime prTime, michael@0: nsAString& stringOut) = 0; michael@0: michael@0: // performs a locale sensitive date formatting operation on the PRExplodedTime parameter michael@0: NS_IMETHOD FormatPRExplodedTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const PRExplodedTime* explodedTime, michael@0: nsAString& stringOut) = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIDateTimeFormat, NS_IDATETIMEFORMAT_IID) michael@0: michael@0: #endif /* nsIDateTimeFormat_h__ */