44static const unsigned long SECONDS_IN_HOUR = 3600L;
45static const unsigned SECONDS_IN_MIN = 60;
53static const TInitTime cludgeTime;
58static const int SUNDAY = 7;
84TTime TTime::BuildLocal(
const TDate & date,
HourTy h )
104 return BuildLocal(
endMarch.Previous(SUNDAY)+7, 2 );
109 return BuildLocal(
TDate(6,1,1974), 2 );
111 return BuildLocal(
TDate(23,2,1975), 2 );
114 return BuildLocal(
endApril.Previous(SUNDAY), 2 );
127 return BuildLocal(
endOctober.Previous(SUNDAY), 1 );
186 SECONDS_IN_HOUR * (
h-1L) +
187 SECONDS_IN_MIN *
m + s;
192 Sec += SECONDS_IN_HOUR;
194 Sec -= SECONDS_IN_HOUR;
197 Sec += SECONDS_IN_HOUR;
251 return diff==0 ? 0 :
diff > 0 ? 1 : -1;
260 return (
unsigned)Sec;
The TDate class represents a date.
int Between(const TDate &d1, const TDate &d2) const
Returns 1 if this TDate object is between d1 and d2, inclusive.
int IsValid() const
Returns 1 if this TDate is valid, 0 otherwise.
TFileTime is a class derived from the structure FILETIME.
TSystemTime is a class derived from the structure SYSTEMTIME.
static TSystemTime LocalTime()
The TTime class encapsulates time functions and characteristics.
HourTy HourGMT() const
Returns the hour in Greenwich mean time.
TFileTime GetFileTime() const
unsigned Hash() const
Hash function: Returns seconds since January 1, 1901.
SecondTy Second() const
Returns seconds.
MinuteTy Minute() const
Returns the minute in local time.
MinuteTy MinuteGMT() const
Returns the minute in Greenwich Mean Time.
TTime Max(const TTime &t) const
Returns either this TTime object or t, whichever is greater.
TSystemTime GetSystemTime() const
static TTime BeginDST(unsigned year)
Return the time at which DST starts for the given year.
static const TDate MaxDate
The maximum valid date for TTime objects.
HourTy Hour() const
Returns the hour in local time.
friend TDate::TDate(const TTime &)
TTime()
Construct TTime with current time (seconds since Jan 1, 1901).
static const TDate RefDate
The minimum valid date for TTime objects: January 1, 1901.
TTime Min(const TTime &t) const
Returns either this TTime object or t, whichever is less.
int IsDST() const
Returns 1 if the time is in daylight saving time; 0 otherwise.
int CompareTo(const TTime &) const
Compares t to this TTime object and returns 0 if the times are equal, 1 if t is earlier,...
static TTime EndDST(unsigned year)
Return the time at which DST ends for the given year.
static int AssertDate(const TDate &)
Returns 1 if d is between the earliest valid date (RefDate) and the latest valid date (MaxDate).
Object Windows Library (OWLNext Core)
const uint32 SECONDS_IN_DAY
unsigned YearTy
Year type.
STDAPI __declspec(dllexport) DllRegisterCommand(LPCTSTR cmdLine)
Entry point for complete registration management via command line Don't let any exceptions blow back ...
Definition of TUIMetric, a UI metrics provider class.
Classes for window system structure and type encapsulation.