TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iTime Struct Referenceabstract
Inheritance diagram for iTime:
iUnknown

Detailed Description

Time interface.

Public Member Functions

virtual void UpdateFromCurrentSystemTime ()=0
 Update the time class from the current system's time. More...
 
virtual void SetYear (tI32 anYear)=0
 Set the year. {Property}. More...
 
virtual tI32 GetYear () const =0
 Get the year. {Property}. More...
 
virtual void SetMonth (tU8 anMonth)=0
 Set the month. {Property}. More...
 
virtual tU8 GetMonth () const =0
 Get the month. {Property}. More...
 
virtual void SetDay (tU8 anDay)=0
 Set the day. {Property}. More...
 
virtual tU8 GetDay () const =0
 Get the day. {Property}. More...
 
virtual tU8 GetWeekday () const =0
 Get the weekday. {Property}. More...
 
virtual void SetHour (tU8 anHour)=0
 Set the hour. {Property}. More...
 
virtual tU8 GetHour () const =0
 Get the hour. {Property}. More...
 
virtual void SetMinute (tU8 anMinute)=0
 Set the minute. {Property}. More...
 
virtual tU8 GetMinute () const =0
 Get the minute. {Property}. More...
 
virtual void SetSecond (tU8 anSecond)=0
 Set the second. {Property}. More...
 
virtual tU8 GetSecond () const =0
 Get the second. {Property}. More...
 
virtual tBool Copy (const iTime *apTime)=0
 Copy the specified time. More...
 
virtual iTimeClone () const =0
 Creates a clone of this time. More...
 
virtual void SetDayLightSaving (ni::tBool abDayLightSaving)=0
 Set whether the time contains day light saving. {Property}. More...
 
virtual tBool GetDayLightSaving () const =0
 Get whether the time contains day light saving. {Property}. More...
 
virtual void SetTimeZone (tI32 anTimeZone)=0
 Set the time zone. {Property}. More...
 
virtual tI32 GetTimeZone () const =0
 Get the time zone. {Property}. More...
 
virtual void SetUnixTimeSecs (tI64 anFmt)=0
 Set the time from the unix time. {Property}. More...
 
virtual tI64 GetUnixTimeSecs () const =0
 Get the unix time. {Property}. More...
 
virtual tI32 Compare (const iTime *apTime) const =0
 Compare to another time object. More...
 
virtual iTimeParseString (const achar *szString, const achar *aszFormat)=0
 Parse a time string. More...
 
virtual cString Format (const achar *aszFormat) const =0
 Format time. More...
 
virtual iTimeAddSeconds (tI64 anSeconds)=0
 Add seconds to this time. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual void UpdateFromCurrentSystemTime ( )
pure virtual

Update the time class from the current system's time.

virtual void SetYear ( tI32  anYear)
pure virtual

Set the year. {Property}.

virtual tI32 GetYear ( ) const
pure virtual

Get the year. {Property}.

virtual void SetMonth ( tU8  anMonth)
pure virtual

Set the month. {Property}.

virtual tU8 GetMonth ( ) const
pure virtual

Get the month. {Property}.

virtual void SetDay ( tU8  anDay)
pure virtual

Set the day. {Property}.

virtual tU8 GetDay ( ) const
pure virtual

Get the day. {Property}.

virtual tU8 GetWeekday ( ) const
pure virtual

Get the weekday. {Property}.

virtual void SetHour ( tU8  anHour)
pure virtual

Set the hour. {Property}.

virtual tU8 GetHour ( ) const
pure virtual

Get the hour. {Property}.

virtual void SetMinute ( tU8  anMinute)
pure virtual

Set the minute. {Property}.

virtual tU8 GetMinute ( ) const
pure virtual

Get the minute. {Property}.

virtual void SetSecond ( tU8  anSecond)
pure virtual

Set the second. {Property}.

virtual tU8 GetSecond ( ) const
pure virtual

Get the second. {Property}.

virtual tBool Copy ( const iTime apTime)
pure virtual

Copy the specified time.

virtual iTime* Clone ( ) const
pure virtual

Creates a clone of this time.

virtual void SetDayLightSaving ( ni::tBool  abDayLightSaving)
pure virtual

Set whether the time contains day light saving. {Property}.

virtual tBool GetDayLightSaving ( ) const
pure virtual

Get whether the time contains day light saving. {Property}.

virtual void SetTimeZone ( tI32  anTimeZone)
pure virtual

Set the time zone. {Property}.

Remarks
Offset from UTC in seconds.
virtual tI32 GetTimeZone ( ) const
pure virtual

Get the time zone. {Property}.

Remarks
Offset from UTC in seconds.
virtual void SetUnixTimeSecs ( tI64  anFmt)
pure virtual

Set the time from the unix time. {Property}.

virtual tI64 GetUnixTimeSecs ( ) const
pure virtual

Get the unix time. {Property}.

virtual tI32 Compare ( const iTime apTime) const
pure virtual

Compare to another time object.

Returns
0 if equal, -1 if this is before apTime, +1 if this is after apTime, 2 if apTime is invalid.
virtual iTime* ParseString ( const achar szString,
const achar aszFormat 
)
pure virtual

Parse a time string.

Remarks
Parse format: A Full weekday name. Ex: Thursday b Abbreviated month name. Ex: Aug B Full month name. Ex: August d Day of the month, zero-padded (01-31). Ex: 23 e Day of the month, space-padded ( 1-31). Ex: 23 h Abbreviated month name (same as b). Ex: Aug H Hour in 24h format (00-23). Ex: 14 I Hour in 12h format (01-12). Ex: 02 j Day of the year (001-366). Ex: 235 m Month as a decimal number (01-12). Ex: 08 M Minute (00-59). Ex: 55 n New-line character ('
'). t Horizontal-tab character (''). p AM or PM designation. Ex: PM r 12-hour clock time. Ex: 02:55:02 pm R 24-hour HH:MM time, equivalent to H:M. Ex: 14:55 S Second (00-61). Ex: 02 w Weekday as a decimal number with Sunday as 0 (0-6). Ex: 4 y Year, last two digits (00-99). Ex: 01 Y Year. Ex: 2001 z An RFC-822/ISO 8601 standard timezone specification. Ex: Z (GMT), +08 (+8 hours), -0630 (-6hrs & 30 minutes) F ISO 8601 date format (YYYY-MM-DD), equivalent to Y-m-d. Ex: 2016-08-03 T ISO 8601 time format (HH:MM:SS), equivalent to H:M:S. Ex: 05:55:10 %% A % sign ISO8601 or NULL or empty string, ISO8601 date time format, equivalent to: FTTz & Y-m-dTH:M:Sz
Returns
This time object.
virtual cString Format ( const achar aszFormat) const
pure virtual

Format time.

Remarks
Format syntax: YYYY year 2011 YY year 99 M month 1 2 ... 30 31 MM month 01 02 ... 30 31 MMM month Mar MMMM month March D day of month 1 2 ... 30 31 Do day of month 1st 2nd ... 30th 31st DD day of month 01 02 ... 30 31 d day of week 0 1 ... 5 6 do day of week 0th 1st ... 5th 6th dd day of week Su ddd day of week Sun dddd day of week Sunday e day of week 0 1 ... 5 6 E day of week 1 2 ... 6 7 a am/pm marker am/pm A AM/PM marker AM/PM H hour(0-23) 16 HH hour(0-23) 06 h hour(1-12) 4 hh hour(1-12) 04 m minute 6 mm minute 06 s second 6 ss second 06 Z timezone -07:00 -06:00 ... +06:00 +07:00 ZZ timezone -0700 -0600 ... +0600 +0700 RFC1123 RFC1123 Wed, 16 Feb 2011 03:34:56 Z RFC850 RFC850 Wednesday, 16-Feb-11 03:34:56 Z ASCTIME ASCTIME Wed Feb 16 03:34:56 2011 ISO8601 or NULL or empty string, ISO8601, 2014-09-08T08:02:17-05:00 [text to include verbatim]
virtual iTime* AddSeconds ( tI64  anSeconds)
pure virtual

Add seconds to this time.