Common default datetime formats.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-01-17 21:29:23 +00:00
parent 9b877d1846
commit 1aaf88d220
6 changed files with 42 additions and 34 deletions

View File

@@ -110,7 +110,10 @@ class WXDLLIMPEXP_BASE wxDateSpan;
// wxInvalidDateTime)
class WXDLLIMPEXP_BASE wxDateTime;
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultDateTimeFormat;
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultTimeSpanFormat;
extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime;
#define wxInvalidDateTime wxDefaultDateTime
// ----------------------------------------------------------------------------
@@ -935,7 +938,7 @@ public:
// default, they will not change if they had valid values or will
// default to Today() otherwise)
const wxChar *ParseFormat(const wxChar *date,
const wxChar *format = _T("%c"),
const wxChar *format = wxDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime);
// parse a string containing the date/time in "free" format, this
// function will try to make an educated guess at the string contents
@@ -950,7 +953,7 @@ public:
// argument corresponds to the preferred date and time representation
// for the current locale) and returns the string containing the
// resulting text representation
wxString Format(const wxChar *format = _T("%c"),
wxString Format(const wxChar *format = wxDefaultDateTimeFormat,
const TimeZone& tz = Local) const;
// preferred date representation for the current locale
wxString FormatDate() const { return Format(_T("%x")); }
@@ -1138,7 +1141,7 @@ public:
// resulting text representation. Notice that only some of format
// specifiers valid for wxDateTime are valid for wxTimeSpan: hours,
// minutes and seconds make sense, but not "PM/AM" string for example.
wxString Format(const wxChar *format = _T("%H:%M:%S")) const;
wxString Format(const wxChar *format = wxDefaultTimeSpanFormat) const;
// implementation
// ------------------------------------------------------------------------