12 #ifndef _INC_cTimeInt_H
13 #define _INC_cTimeInt_H
14 #ifndef NO_PRAGMA_ONCE
57 return(m_time <= nTime);
61 return(m_time == nTime);
65 return(m_time != nTime);
69 return(m_time >= ttime.m_time);
146 {
return (
TIMESEC_t) SUPER_t::GetTime(); }
149 static cTimeInt
GRAYCALL GetTimeNow() noexcept;
159 void InitTimeNowPlusSec(
TIMESECD_t iOffsetInSeconds);
160 void InitTime(
TIMESEC_t nTime = k_nZero);
186 return(-get_TimeTilSec());
190 return((
unsigned)GetTime() > (
unsigned)GetTimeNow().GetTime());
195 return(nTime > k_nZero);
200 return(IsTimeValid((
TIMESEC_t)GetTime()));
215 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: cTimeInt.h:25
const CTime & operator=(const CTime &timeSrc) noexcept
Definition: cTimeInt.h:44
bool operator!=(TIMESEC_t nTime) const noexcept
Definition: cTimeInt.h:63
bool operator<=(TIMESEC_t nTime) const noexcept
Definition: cTimeInt.h:55
bool operator==(TIMESEC_t nTime) const noexcept
Definition: cTimeInt.h:59
TIMESEC_t GetTime() const noexcept
Definition: cTimeInt.h:76
const CTime & operator=(TIMESEC_t nTime) noexcept
Definition: cTimeInt.h:49
TIMESEC_t GetTotalSeconds() const noexcept
Definition: cTimeInt.h:80
TIMESEC_t m_time
Seconds. Essentially the UNIX long time format. (not usable after 2018 unless 64 bit?...
Definition: cTimeInt.h:35
bool operator>=(CTime ttime) const noexcept
Definition: cTimeInt.h:67
CTime(TIMESEC_t nTime=((TIMESEC_t) 0)) noexcept
Definition: cTimeInt.h:38
Definition: cTimeFile.h:31
< similar to the MFC CTime and cTimeSpan, not as accurate or large ranged as COleDateTime
Definition: cTimeInt.h:101
cTimeInt(double dTimeDays)
Definition: cTimeInt.h:132
HRESULT SetTimeStr(const GChar_t *pszTimeDate, TZ_TYPE nTimeZoneOffset=TZ_LOCAL)
Definition: cTimeInt.cpp:273
TIMESECD_t GetSecondsSince(const cTimeInt &time) const
Definition: cTimeInt.h:166
cTimeInt(TIMESEC_t time)
Definition: cTimeInt.h:120
TIMESECD_t get_TimeTilSec() const
Definition: cTimeInt.h:173
cTimeInt(const cTimeUnits &rTu)
Definition: cTimeInt.h:126
cTimeInt()
Definition: cTimeInt.h:118
int get_TotalDays() const
Definition: cTimeInt.h:202
static bool IsTimeValid(TIMESEC_t nTime)
Definition: cTimeInt.h:193
static cTimeInt __stdcall GetTimeFromStr(const GChar_t *pszDateTime, TZ_TYPE nTimeZoneOffset)
Definition: cTimeInt.h:136
cString GetTimeFormStr(TIME_FORMAT_TYPE eFormat, TZ_TYPE nTimeZoneOffset=TZ_LOCAL) const
Definition: cTimeInt.h:213
bool isTimeValid() const
Definition: cTimeInt.h:197
TIMESECD_t get_AgeSec() const
Definition: cTimeInt.h:182
void InitTimeNow()
Definition: cTimeInt.cpp:83
bool isTimeFuture() const
Definition: cTimeInt.h:188
cTimeInt(const cTimeFile &fileTime)
Definition: cTimeInt.h:122
Definition: cTimeInt.h:87
int m_nDiffSeconds
Definition: cTimeInt.h:91
cTimeSpan()
Definition: cTimeInt.h:93
Definition: cTimeUnits.h:146
static const TIMESECD_t k_nSecondsPerDay
seconds in a day = 86400
Definition: cTimeUnits.h:165
< 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
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
int TIMESECD_t
signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h.
Definition: cTimeSys.h:19
TIMEUNIT_TYPE
Definition: cTimeUnits.h:124
@ TIMEUNIT_Day
day of month. base 1. (1<=x<=31)
Definition: cTimeUnits.h:130
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
TIME_FORMAT_TYPE
Definition: cTimeUnits.h:48