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:
parent
e87b7b6000
commit
c30aaf75f0
@ -36,17 +36,18 @@ enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN};
|
||||
#define wxNO_CENTURY 0x02
|
||||
#define wxDATE_ABBR 0x04
|
||||
|
||||
class WXDLLEXPORT wxDate: public wxObject
|
||||
class WXDLLEXPORT wxDate : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDate)
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS(wxDate)
|
||||
|
||||
protected:
|
||||
unsigned long julian; // see julDate(); days since 1/1/4713 B.C.
|
||||
int month; // see NMonth()
|
||||
int day; // see Day()
|
||||
int year; // see NYear4()
|
||||
int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday
|
||||
|
||||
private:
|
||||
private:
|
||||
int DisplayFormat;
|
||||
unsigned char DisplayOptions;
|
||||
|
||||
@ -54,7 +55,7 @@ class WXDLLEXPORT wxDate: public wxObject
|
||||
void julian_to_wday (); // convert julian day to day_of_week
|
||||
void mdy_to_julian (); // convert mdy to julian day
|
||||
|
||||
public:
|
||||
public:
|
||||
wxDate ();
|
||||
wxDate (long j);
|
||||
wxDate (int m, int d, int y);
|
||||
@ -138,6 +139,6 @@ class WXDLLEXPORT wxDate: public wxObject
|
||||
wxDate Previous(int dayOfWeek) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_TIMEDATE
|
||||
#endif
|
||||
// _WX_DATE_H_
|
||||
|
@ -16,8 +16,9 @@
|
||||
#pragma interface "log.h"
|
||||
#endif
|
||||
|
||||
#include <wx/dynarray.h>
|
||||
#include <time.h>
|
||||
#include <time.h> // for time_t
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
wxDate::wxDate()
|
||||
{
|
||||
@ -129,7 +129,7 @@ void wxDate::operator = (const wxDate &dt)
|
||||
month = dt.month;
|
||||
day = dt.day;
|
||||
year = dt.year;
|
||||
mdy_to_julian ();
|
||||
mdy_to_julian (); // wxUSE_TIMEDATE
|
||||
}
|
||||
|
||||
void wxDate::operator = (const wxString& dat)
|
||||
@ -472,7 +472,7 @@ bool wxDate::IsLeapYear( void ) const
|
||||
|
||||
wxDate& wxDate::Set()
|
||||
{
|
||||
//#ifdef __WXMSW__
|
||||
//#ifdef __WXMSW__
|
||||
#if 0
|
||||
struct _dosdate_t sDate;
|
||||
_dos_getdate(&sDate);
|
||||
@ -634,16 +634,16 @@ wxDate wxDate::Previous(int dayOfWeek) const
|
||||
int this_day_Of_Week, desired_day_Of_Week;
|
||||
long j;
|
||||
|
||||
// Set the desired and current day of week to start at 0 (Monday)
|
||||
// and end at 6 (Sunday).
|
||||
// Set the desired and current day of week to start at 0 (Monday)
|
||||
// and end at 6 (Sunday).
|
||||
|
||||
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.
|
||||
j = julian;
|
||||
|
||||
// Have to determine how many days difference from current day back to
|
||||
// desired, if any. Special calculation under the 'if' statement to
|
||||
// effect the wraparound counting from Monday (0) back to Sunday (6).
|
||||
// Have to determine how many days difference from current day back to
|
||||
// desired, if any. Special calculation under the 'if' statement to
|
||||
// effect the wraparound counting from Monday (0) back to Sunday (6).
|
||||
|
||||
if (desired_day_Of_Week > this_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
|
||||
wxIsAbsolutePath (const wxString& filename)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user