8#if !defined(OWL_TIME_H)
12#if defined(BI_HAS_PRAGMA_ONCE)
35static const unsigned long secFrom_Jan_1_1901_to_Jan_1_1970 = 2177452800UL;
57 unsigned Hash()
const;
77 int operator < (
const TTime & t )
const;
78 int operator <= (
const TTime & t )
const;
79 int operator > (
const TTime & t )
const;
80 int operator >= (
const TTime & t )
const;
81 int operator == (
const TTime & t )
const;
82 int operator != (
const TTime & t )
const;
109 static int PrintDateFlag;
176 return *
this >= a && *
this <= b;
182 return TTime(t.Sec+s);
188 return TTime(t.Sec+s);
194 return TTime(t.Sec-s);
200 return TTime(t.Sec-s);
TDate()
Construct a TDate with the current date.
TFileTime is a class derived from the structure FILETIME.
TSystemTime is a class derived from the structure SYSTEMTIME.
The TTime class encapsulates time functions and characteristics.
int Between(const TTime &a, const TTime &b) const
Returns 1 if the target date is between TTime a and TTime b, 0 otherwise.
HourTy HourGMT() const
Returns the hour in Greenwich mean time.
void operator++()
Increments the time by 1 second.
TFileTime GetFileTime() const
int operator!=(const TTime &t) const
Returns 1 if the target time is not equal to time t, 0 otherwise.
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.
int operator<(const TTime &t) const
Returns 1 if the target time is less than time t, 0 otherwise.
static const TDate MaxDate
The maximum valid date for TTime objects.
HourTy Hour() const
Returns the hour in local time.
int operator==(const TTime &t) const
Returns 1 if the target time is equal to time t, 0 otherwise.
ClockTy Seconds() const
Returns seconds since January 1, 1901.
int operator>=(const TTime &t) const
Returns 1 if the target time is greater than or equal to time t, 0 otherwise.
static int PrintDate(int)
Set flag to 1 to print the date along with the time; set to 0 to not print the date.
int operator>(const TTime &t) const
Returns 1 if the target time is greater than time t, 0 otherwise.
void operator-=(long s)
Subtracts s seconds from the time.
TTime()
Construct TTime with current time (seconds since Jan 1, 1901).
void operator--()
Decrements the time by 1 second.
void operator+=(long s)
Adds s seconds to the time.
int operator<=(const TTime &t) const
Returns 1 if the target time is less than or equal to time t, 0 otherwise.
tstring AsString() const
Returns a string object containing the time.
int IsValid() const
Returns 1 if this TTime object contains a valid time, 0 otherwise.
friend TDate::TDate(const TTime &)
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).
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Object Windows Library (OWLNext Core).
TTime operator+(const TTime &t, long s)
Adds s seconds to time t.
TTime operator-(const TTime &t, long s)
Performs subtraction, in seconds, between s and t.
unsigned HashValue(TDate &d)