// returns the time zone in the C sense, i.e. the difference UTC - local
// (in seconds)
-static int GetTimeZone()
+// NOTE: not static because used by datetimefmt.cpp
+int GetTimeZone()
{
// set to true when the timezone is set
static bool s_timezoneSet = false;
#ifdef HAVE_STRFTIME
// this function is a wrapper around strftime(3) adding error checking
-static wxString CallStrftime(const wxString& format, const tm* tm)
+// NOTE: not static because used by datetimefmt.cpp
+wxString CallStrftime(const wxString& format, const tm* tm)
{
wxChar buf[4096];
// Create temp wxString here to work around mingw/cygwin bug 1046059
}
}
-// fll the struct tm with default values
-static void InitTm(struct tm& tm)
+// fill the struct tm with default values
+// NOTE: not static because used by datetimefmt.cpp
+void InitTm(struct tm& tm)
{
// struct tm may have etxra fields (undocumented and with unportable
// names) which, nevertheless, must be set to 0
// static functions
// ----------------------------------------------------------------------------
+/* static */
+struct tm *wxDateTime::GetTmNow(struct tm *tmstruct)
+{
+ time_t t = GetTimeNow();
+ return wxLocaltime_r(&t, tmstruct);
+}
+
/* static */
bool wxDateTime::IsLeapYear(int year, wxDateTime::Calendar cal)
{
// implementation of wxDateTime
// ============================================================================
+// ----------------------------------------------------------------------------
+// helpers shared between datetime.cpp and datetimefmt.cpp
+// ----------------------------------------------------------------------------
+
+extern void InitTm(struct tm& tm);
+
+extern int GetTimeZone();
+
+extern wxString CallStrftime(const wxString& format, const tm* tm);
+
// ----------------------------------------------------------------------------
// constants (see also datetime.cpp)
// ----------------------------------------------------------------------------
return wd;
}
-/* static */
-struct tm *wxDateTime::GetTmNow(struct tm *tmstruct)
-{
- time_t t = GetTimeNow();
- return wxLocaltime_r(&t, tmstruct);
-}
-
// scans all digits (but no more than len) and returns the resulting number
static bool GetNumericToken(size_t len,
const wxStringCharType*& p,