#include "wx/setup.h"
-#if USE_TIMEDATE
+#if wxUSE_TIMEDATE
#include "wx/date.h"
#include <wx/intl.h>
#include <string.h>
#include <stdlib.h>
-#if USE_IOSTREAMH
+#if wxUSE_IOSTREAMH
#include <iostream.h>
#else
#include <iostream>
char *token = strtok(buf,"/-");
month = atoi(token);
- day = atoi(strtok(NULL,"/-"));
- year = atoi(strtok(NULL," "));
+ day = atoi(strtok((char *) NULL,"/-"));
+ year = atoi(strtok((char *) NULL," "));
}
mdy_to_julian ();
char *token = strtok(buf,"/-");
month = atoi(token);
- day = atoi(strtok(NULL,"/-"));
- year = atoi(strtok(NULL," "));
+ day = atoi(strtok((char *) NULL,"/-"));
+ year = atoi(strtok((char *) NULL," "));
}
mdy_to_julian ();
// Conversion operations
//////////////////////////////////////////////////////////////
+#ifndef __SALFORDC__
wxDate::operator wxString( void )
{
return FormatDate();
}
+#endif
//////////////////////////////////////////////////////////////
// Date Arithmetic
// Date comparison
//////////////////////////////////////////////////////////////
-bool operator < (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator < (const wxDate &dt1, const wxDate &dt2)
{
return ( dt1.julian < dt2.julian );
}
-bool operator <= (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator <= (const wxDate &dt1, const wxDate &dt2)
{
return ( (dt1.julian == dt2.julian) || (dt1.julian < dt2.julian) );
}
-bool operator > (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator > (const wxDate &dt1, const wxDate &dt2)
{
return ( dt1.julian > dt2.julian );
}
-bool operator >= (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator >= (const wxDate &dt1, const wxDate &dt2)
{
return ( (dt1.julian == dt2.julian) || (dt1.julian > dt2.julian) );
}
-bool operator == (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator == (const wxDate &dt1, const wxDate &dt2)
{
return ( dt1.julian == dt2.julian );
}
-bool operator != (const wxDate &dt1, const wxDate &dt2)
+bool WXDLLEXPORT operator != (const wxDate &dt1, const wxDate &dt2)
{
return ( dt1.julian != dt2.julian );
}
// Ostream operations
////////////////////////////////////////////////////////////////
-ostream &operator << (ostream &os, const wxDate &dt)
+ostream WXDLLEXPORT & operator << (ostream &os, const wxDate &dt)
{
return os << (const char *) dt.FormatDate();
}
mdy_to_julian();
#else
- time_t now = time(NULL);
+ time_t now = time((time_t *) NULL);
struct tm *localTime = localtime(&now);
month = localTime->tm_mon + 1;