#if wxUSE_IOSTREAMH
#include <iostream.h>
+#include <iomanip.h>
#else
#include <iostream>
+#include <iomanip>
+# ifdef _MSC_VER
+ using namespace std;
+# endif
#endif
-#include <iomanip.h>
#include <string.h>
#if !USE_SHARED_LIBRARY
wxTimeInitialized = TRUE;
}
sec = wxGetCurrentTime();
+#ifdef __SALFORDC__
+ sec += (unsigned long) 2177452800; /* seconds from 1/1/01 to 1/1/70 */
+#else
sec += 2177452800UL; /* seconds from 1/1/01 to 1/1/70 */
+#endif
}
wxTime::wxTime(hourTy h, minuteTy m, secondTy s, bool dst)
sec += TIME_ZONE; // adjust to GMT
}
+#ifndef __SALFORDC__
wxTime::operator wxDate() const
/*
Convert a wxTime to a local wxDate
date += daycount;
return date;
}
+#endif
bool wxTime::IsBetween(const wxTime& a, const wxTime& b) const
{
return (secondTy)(((sec % 86400) % 3600) % 60);
}
+secondTy wxTime::GetSecondGMT() const
+/*
+ Return the minute of this wxTime in GMT.
+*/
+{
+ return (secondTy)(((sec % 86400) % 3600) % 60);
+}
+
+int wxTime::GetDay() const
+{
+ wxDate da((wxDate) *this);
+ return da.GetDay();
+}
+
+int wxTime::GetDayOfWeek() const
+{
+ wxDate da((wxDate) *this);
+ return da.GetDayOfWeek();
+}
+
+int wxTime::GetMonth() const
+{
+ wxDate da((wxDate) *this);
+ return da.GetMonth();
+}
+
+int wxTime::GetYear() const
+{
+ wxDate da((wxDate) *this);
+ return da.GetYear();
+}
+
wxTime wxTime::Max(const wxTime& t) const
{
if (t < *this) return *this;
return t;
}
+#ifndef __SALFORDC__
wxTime::operator char *(void)
{
return FormatTime();
}
+#endif
void wxTime::SetFormat(const wxTime::tFormat lFormat,
const wxTime::tPrecision lPrecision) {