8 #ifndef _INC_cTimeDouble_H
9 #define _INC_cTimeDouble_H
10 #ifndef NO_PRAGMA_ONCE
29 static const int k_nDaysDiffTimeInt = 25569;
32 static const int k_nZero = 0;
43 : m_dateTime(dt.m_dateTime)
57 : m_dateTime(GetTimeFromSec(nTimeSec))
63 : m_dateTime(GetTimeFromFile(ft))
89 return(dTime > k_nZero);
93 return IsTimeValid(m_dateTime);
105 operator double(
void)
const
117 SetTimeStr(pszDateTime,
TZ_UTC);
202 return unsigned(m_dateTime);
210 return(get_Double() - GetTimeNow());
218 return(-get_DaysTil());
226 return GetTimeFormStr((
const GChar_t*)eFormat, nTimeZoneOffset);
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cTimeDouble.h:21
static const double k_nY2K
The static value for y2k = January 1, 2000 in UTC/GMT.
Definition: cTimeDouble.h:30
double m_dateTime
DATE = days since (midnight, 30 December 1899 GMT), fraction = time of day.
Definition: cTimeDouble.h:35
cTimeDouble(const cTimeDouble &dt)
Definition: cTimeDouble.h:42
cTimeDouble(const cTimeFile &ft)
Definition: cTimeDouble.h:62
unsigned GetDate() const
< Numeric date of date object
Definition: cTimeDouble.h:199
bool isTimeValid() const
Definition: cTimeDouble.h:91
static bool IsTimeValid(double dTime)
Definition: cTimeDouble.h:87
static const double k_nY10
The first 10 years are sometimes reserved to act as offsets.
Definition: cTimeDouble.h:31
static cTimeDouble __stdcall GetTimeFromStr(const GChar_t *pszDateTime, TZ_TYPE nTimeZoneOffset)
Definition: cTimeDouble.h:67
cTimeDouble(const cTimeUnits &rTu)
Definition: cTimeDouble.h:74
double get_DaysAge() const
Definition: cTimeDouble.h:212
double get_DaysTil() const
Definition: cTimeDouble.h:205
HRESULT SetTimeStr(const GChar_t *pszDateTime, TZ_TYPE nTimeZoneOffset=TZ_UTC)
Definition: cTimeDouble.cpp:290
cTimeDouble(const double dTime=k_nZero)
Definition: cTimeDouble.h:46
void InitTime(double dTime=k_nZero)
Definition: cTimeDouble.h:81
cString GetTimeFormStr(TIME_FORMAT_TYPE eFormat, TZ_TYPE nTimeZoneOffset=TZ_LOCAL) const
Definition: cTimeDouble.h:224
double get_Double() const
Definition: cTimeDouble.h:95
double get_Days() const
Definition: cTimeDouble.h:100
cTimeDouble(const TIMESEC_t nTimeSec)
Definition: cTimeDouble.h:56
Definition: cTimeFile.h:31
Definition: cTimeUnits.h:146
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
TZ_TYPE
Definition: cTimeUnits.h:29
@ TZ_LOCAL
just use local time zone. might include DST ??
Definition: cTimeUnits.h:44
@ TZ_UTC
UTC = never use DST or any TZ offset.
Definition: cTimeUnits.h:35
bool operator<(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:234
TIMEUNIT_TYPE
Definition: cTimeUnits.h:124
@ TIMEUNIT_Day
day of month. base 1. (1<=x<=31)
Definition: cTimeUnits.h:130
TIMEDOW_TYPE
Definition: cTimeUnits.h:77
bool operator>=(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:246
time_t TIMESEC_t
absolute seconds since January 1, 1970. (GMT?)(signed) NOTE: Changing to __time64_t just adds more ra...
Definition: cTimeUnits.h:23
char GChar_t
My version of TCHAR, _TCHAR.
Definition: StrConst.h:26
cStringA operator+(const char *pStr1, const cStringA &s2)
Definition: cString.h:642
bool operator!=(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:254
bool operator==(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:250
bool operator>(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:242
TIME_FORMAT_TYPE
Definition: cTimeUnits.h:48
bool operator<=(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:238