51 #ifndef HEADER_INCLUDED__SAGA_API__datetime_H
52 #define HEADER_INCLUDED__SAGA_API__datetime_H
102 m_span = msec + 1000 * (sec + 60 * ((
sLong)min + 60 * (
sLong)hours));
142 bool is_Null (
void)
const {
return( m_span == 0l ); }
146 bool operator ! (
void)
const {
return( !is_Null() ); }
155 bool operator != (
const CSG_TimeSpan &ts)
const {
return( m_span != ts.m_span ); }
159 int Get_Weeks (
void)
const {
return( Get_Days () / 7 ); }
160 int Get_Days (
void)
const {
return( Get_Hours () / 24 ); }
161 int Get_Hours (
void)
const {
return( Get_Minutes() / 60 ); }
162 int Get_Minutes (
void)
const {
return( (
int)(Get_Seconds() / 60) ); }
197 Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
Sep, Oct, Nov, Dec, Inv_Month
202 Sun, Mon, Tue,
Wed, Thu, Fri, Sat, Inv_WeekDay
224 CSG_DateTime( TSG_DateTime Hour , TSG_DateTime Minute = 0, TSG_DateTime Second = 0, TSG_DateTime Millisec = 0);
225 CSG_DateTime(TSG_DateTime Day, Month Month,
int Year = Inv_Year, TSG_DateTime Hour = 0, TSG_DateTime Minute = 0, TSG_DateTime Second = 0, TSG_DateTime Millisec = 0);
234 CSG_DateTime & Set ( TSG_DateTime Hour , TSG_DateTime Minute = 0, TSG_DateTime Second = 0, TSG_DateTime Millisec = 0);
235 CSG_DateTime & Set (TSG_DateTime Day, Month Month,
int Year = Inv_Year, TSG_DateTime Hour = 0, TSG_DateTime Minute = 0, TSG_DateTime Second = 0, TSG_DateTime Millisec = 0);
261 bool is_DST (
void)
const;
275 bool is_Valid (
void)
const;
277 sLong Get_Value (
void)
const;
279 unsigned short Get_Millisecond (
void)
const;
280 unsigned short Get_Second (
void)
const;
281 unsigned short Get_Minute (
void)
const;
282 unsigned short Get_Hour (
void)
const;
284 unsigned short Get_Day (
void)
const;
285 Month Get_Month (
void)
const;
286 int Get_Year (
void)
const;
288 unsigned short Get_DayOfYear (
void)
const;
289 WeekDay Get_WeekDay (
void)
const;
290 TSG_DateTime Get_WeekOfMonth (
void)
const;
291 TSG_DateTime Get_WeekOfYear (
void)
const;
293 double Get_JDN (
void)
const;
294 double Get_MJD (
void)
const;
298 bool is_EarlierThan (
const CSG_DateTime &DateTime)
const;
334 CSG_String Format_ISOCombined (
char sep =
'T')
const;
337 bool Parse_DateTime (
const CSG_String &datetime);
341 bool Parse_ISOCombined (
const CSG_String &date,
char sep=
'T');
347 static TSG_DateTime Get_Current_Day (
void);
348 static Month Get_Current_Month (
void);
349 static int Get_Current_Year (
void);
351 static CSG_String Get_MonthName (Month month, NameFlags flags = Name_Full);
352 static CSG_String Get_EnglishMonthName (Month month, NameFlags flags = Name_Full);
353 static CSG_String Get_WeekDayName (WeekDay weekday, NameFlags flags = Name_Full);
354 static CSG_String Get_EnglishWeekDayName (WeekDay weekday, NameFlags flags = Name_Full);
356 static TSG_DateTime Get_NumberOfDays (
int year);
357 static TSG_DateTime Get_NumberOfDays (Month month,
int year = Inv_Year);
359 static bool is_LeapYear (
int year = Inv_Year);
368 class wxDateTime *m_pDateTime;
414 #endif // #ifndef HEADER_INCLUDED__SAGA_API__datetime_H