last fixes to fixes (MSW compilation works now)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,17 +36,18 @@ enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN};
|
|||||||
#define wxNO_CENTURY 0x02
|
#define wxNO_CENTURY 0x02
|
||||||
#define wxDATE_ABBR 0x04
|
#define wxDATE_ABBR 0x04
|
||||||
|
|
||||||
class WXDLLEXPORT wxDate: public wxObject
|
class WXDLLEXPORT wxDate : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDate)
|
DECLARE_DYNAMIC_CLASS(wxDate)
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
unsigned long julian; // see julDate(); days since 1/1/4713 B.C.
|
unsigned long julian; // see julDate(); days since 1/1/4713 B.C.
|
||||||
int month; // see NMonth()
|
int month; // see NMonth()
|
||||||
int day; // see Day()
|
int day; // see Day()
|
||||||
int year; // see NYear4()
|
int year; // see NYear4()
|
||||||
int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday
|
int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int DisplayFormat;
|
int DisplayFormat;
|
||||||
unsigned char DisplayOptions;
|
unsigned char DisplayOptions;
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ class WXDLLEXPORT wxDate: public wxObject
|
|||||||
void julian_to_wday (); // convert julian day to day_of_week
|
void julian_to_wday (); // convert julian day to day_of_week
|
||||||
void mdy_to_julian (); // convert mdy to julian day
|
void mdy_to_julian (); // convert mdy to julian day
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDate ();
|
wxDate ();
|
||||||
wxDate (long j);
|
wxDate (long j);
|
||||||
wxDate (int m, int d, int y);
|
wxDate (int m, int d, int y);
|
||||||
@@ -138,6 +139,6 @@ class WXDLLEXPORT wxDate: public wxObject
|
|||||||
wxDate Previous(int dayOfWeek) const;
|
wxDate Previous(int dayOfWeek) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // wxUSE_TIMEDATE
|
||||||
#endif
|
#endif
|
||||||
// _WX_DATE_H_
|
// _WX_DATE_H_
|
||||||
|
@@ -16,8 +16,9 @@
|
|||||||
#pragma interface "log.h"
|
#pragma interface "log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/dynarray.h>
|
#include <time.h> // for time_t
|
||||||
#include <time.h>
|
|
||||||
|
#include "wx/dynarray.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
|
@@ -63,9 +63,9 @@ static int GauDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Constructors
|
// Constructors
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
wxDate::wxDate()
|
wxDate::wxDate()
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ void wxDate::operator = (const wxDate &dt)
|
|||||||
month = dt.month;
|
month = dt.month;
|
||||||
day = dt.day;
|
day = dt.day;
|
||||||
year = dt.year;
|
year = dt.year;
|
||||||
mdy_to_julian ();
|
mdy_to_julian (); // wxUSE_TIMEDATE
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDate::operator = (const wxString& dat)
|
void wxDate::operator = (const wxString& dat)
|
||||||
@@ -472,7 +472,7 @@ bool wxDate::IsLeapYear( void ) const
|
|||||||
|
|
||||||
wxDate& wxDate::Set()
|
wxDate& wxDate::Set()
|
||||||
{
|
{
|
||||||
//#ifdef __WXMSW__
|
//#ifdef __WXMSW__
|
||||||
#if 0
|
#if 0
|
||||||
struct _dosdate_t sDate;
|
struct _dosdate_t sDate;
|
||||||
_dos_getdate(&sDate);
|
_dos_getdate(&sDate);
|
||||||
@@ -634,16 +634,16 @@ wxDate wxDate::Previous(int dayOfWeek) const
|
|||||||
int this_day_Of_Week, desired_day_Of_Week;
|
int this_day_Of_Week, desired_day_Of_Week;
|
||||||
long j;
|
long j;
|
||||||
|
|
||||||
// Set the desired and current day of week to start at 0 (Monday)
|
// Set the desired and current day of week to start at 0 (Monday)
|
||||||
// and end at 6 (Sunday).
|
// and end at 6 (Sunday).
|
||||||
|
|
||||||
desired_day_Of_Week = dayOfWeek - 1; // These functions return a value
|
desired_day_Of_Week = dayOfWeek - 1; // These functions return a value
|
||||||
this_day_Of_Week = GetDayOfWeek() - 1; // from 1-7. Subtract 1 for 0-6.
|
this_day_Of_Week = GetDayOfWeek() - 1; // from 1-7. Subtract 1 for 0-6.
|
||||||
j = julian;
|
j = julian;
|
||||||
|
|
||||||
// Have to determine how many days difference from current day back to
|
// Have to determine how many days difference from current day back to
|
||||||
// desired, if any. Special calculation under the 'if' statement to
|
// desired, if any. Special calculation under the 'if' statement to
|
||||||
// effect the wraparound counting from Monday (0) back to Sunday (6).
|
// effect the wraparound counting from Monday (0) back to Sunday (6).
|
||||||
|
|
||||||
if (desired_day_Of_Week > this_day_Of_Week)
|
if (desired_day_Of_Week > this_day_Of_Week)
|
||||||
this_day_Of_Week += 7 - desired_day_Of_Week;
|
this_day_Of_Week += 7 - desired_day_Of_Week;
|
||||||
|
@@ -274,12 +274,6 @@ bool wxFileExists(const char *pszFileName)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool wxDirExists( const wxString& dir )
|
|
||||||
{
|
|
||||||
struct stat st;
|
|
||||||
return ((stat(dir, &st) != -1) && S_ISDIR(st.st_mode) ? TRUE : FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
wxIsAbsolutePath (const wxString& filename)
|
wxIsAbsolutePath (const wxString& filename)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user