This is done using the Mode property and is explained in detail below.
Public Member Functions | |
| HRESULT | DateTime ([in] DATE Date) |
| The actual time point that the interface represents. | |
| HRESULT | DateTime ([out, retval] DATE *pDate) |
| The actual time point that the interface represents. | |
| HRESULT | Day ([in] Int32 Day) |
| If IsGmt is TRUE (non-zero), then the Day corresponds to time according to GMT. | |
| HRESULT | Day ([out, retval] Int32 *pDay) |
| If IsGmt is TRUE (non-zero), then the Day corresponds to time according to GMT. | |
| HRESULT | DayOfWeek ([in] EnumDSSDayOfWeek DayOfWeek) |
| If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. | |
| HRESULT | DayOfWeek ([out, retval] EnumDSSDayOfWeek *pDayOfWeek) |
| If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. | |
| HRESULT | Difference ([in] IDSSTime *pTime,[in] EnumDSSTimeGranularityLevel Level,[out, retval] IDSSTimePeriod pTimePeriod) |
| At the specified granularity level, get methods are called on the current time and the time passed and the difference is found. | |
| HRESULT | DynamicDayOffset ([in] Int32 DynamicDayOffset) |
| This is applicable only for dynamic time points. | |
| HRESULT | DynamicDayOffset ([out, retval] Int32 *pDynamicDayOffset) |
| This is applicable only for dynamic time points. | |
| HRESULT | DynamicTime ([in] EnumDSSDynamicTime DynamicTime) |
| IDSSTime interface views time as two hierarchies of levels: Year-Month-Week-DayOfWeek-Hour-Minutes-Seconds-MilliSeconds and Year-Month-Day-Hour-Minutes-Seconds-MilliSeconds. | |
| HRESULT | DynamicTime ([out, retval] EnumDSSDynamicTime *pDynamicTime) |
| IDSSTime interface views time as two hierarchies of levels: Year-Month-Week-DayOfWeek-Hour-Minutes-Seconds-MilliSeconds and Year-Month-Day-Hour-Minutes-Seconds-MilliSeconds. | |
| HRESULT | Format ([in] BSTR Format,[in, defaultvalue(-1)] Int32 Locale,[out, retval] BSTR *oOutputString) |
| The format of the date and/or time (Format) is a string pattern, with substitutable placeholders defined as follows. | |
| HRESULT | GetNthTimePointBefore ([in] Int32 n,[in] EnumDSSTimeGranularityLevel Level,[out, retval] IDSSTime ppTime) |
| Get an absolute time a integer number of time units before this time. | |
| HRESULT | GetShift ([in] Int32 level,[out, retval] Int32 *pShift) |
| This method is applicable only for dynamic time points. | |
| HRESULT | Hour ([in] Int32 Hour) |
| If IsGmt is TRUE (non-zero), then the Hour corresponds to time according to GMT. | |
| HRESULT | Hour ([out, retval] Int32 *pHour) |
| If IsGmt is TRUE (non-zero), then the Hour corresponds to time according to GMT. | |
| HRESULT | Init () |
| This method should be called before any get property or method is called. | |
| HRESULT | IsEqualTo ([in] IDSSTime *pTime,[out, retval] VARIANT_BOOL *pBool) |
| Returns true if both the time points represent the same point of time. | |
| HRESULT | IsGmt ([in] VARIANT_BOOL IsGmt) |
| The IsGmt flag being a VARIANT_BOOL can be TRUE or FALSE. | |
| HRESULT | IsGmt ([out, retval] VARIANT_BOOL *pIsGmt) |
| The IsGmt flag being a VARIANT_BOOL can be TRUE or FALSE. | |
| HRESULT | IsGreaterThan ([in] IDSSTime *pTime,[out, retval] VARIANT_BOOL *pBool) |
| Returns true if the time represented by the current time point is after the time point represented by the time point passed. | |
| HRESULT | IsLessThan ([in] IDSSTime *pTime,[out, retval] VARIANT_BOOL *pBool) |
| Returns true if the time represented by the current time point is before the time point represented by the time point passed. | |
| HRESULT | MilliSeconds ([in] Int32 MilliSeconds) |
| If IsGmt is TRUE (non-zero), then the MilliSeconds correspond to time according to GMT. | |
| HRESULT | MilliSeconds ([out, retval] Int32 *pMilliSeconds) |
| If IsGmt is TRUE (non-zero), then the MilliSeconds correspond to time according to GMT. | |
| HRESULT | Minutes ([in] Int32 Minutes) |
| If IsGmt is TRUE (non-zero), then the Minutes correspond to time according to GMT. | |
| HRESULT | Minutes ([out, retval] Int32 *pMinutes) |
| If IsGmt is TRUE (non-zero), then the Minutes correspond to time according to GMT. | |
| HRESULT | Mode ([in] EnumDSSDateTimeMode Mode) |
| Mode that determines the nature of the time point. | |
| HRESULT | Mode ([out, retval] EnumDSSDateTimeMode *pMode) |
| Mode that determines the nature of the time point. | |
| HRESULT | Month ([in] EnumDSSMonth Month) |
| If IsGmt is TRUE (non-zero), then the Month corresponds to time according to GMT. | |
| HRESULT | Month ([out, retval] EnumDSSMonth *pMonth) |
| If IsGmt is TRUE (non-zero), then the Month corresponds to time according to GMT. | |
| HRESULT | Name ([in] BSTR Name) |
| Stores a name for this time point. | |
| HRESULT | Name ([out, retval] BSTR *pName) |
| Stores a name for this time point. | |
| HRESULT | PopulateDefn ([in] IDSSTime *pTime) |
| Populate the current time point using the time point passed. | |
| HRESULT | Seconds ([in] Int32 pSeconds) |
| If IsGmt is TRUE (non-zero), then the Seconds correspond to time according to GMT. | |
| HRESULT | Seconds ([out, retval] Int32 *pSeconds) |
| If IsGmt is TRUE (non-zero), then the Seconds correspond to time according to GMT. | |
| HRESULT | Shift ([in] IDSSTimePeriod *pTimePeriod,[out, retval] IDSSTime pTime) |
| Shift the current time point by the amount of time represented by the Time Period object. | |
| HRESULT | Text ([in] BSTR Text,[in, defaultvalue(-1)] Int32 Locale) |
| The time point is computed from a given string. | |
| HRESULT | Week ([in] Int32 MonthWeek) |
| If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. | |
| HRESULT | Week ([out, retval] Int32 *pMonthWeek) |
| If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. | |
| HRESULT | Year ([in] Int32 Year) |
| If IsGmt is TRUE (non-zero), then the Year corresponds to time according to GMT. | |
| HRESULT | Year ([out, retval] Int32 *pYear) |
| If IsGmt is TRUE (non-zero), then the Year corresponds to time according to GMT. | |
|
|
The actual time point that the interface represents. This property can be used to manipulate the underlying time of an IDSSTime interface.
|
|
|
The actual time point that the interface represents. This property can be used to manipulate the underlying time of an IDSSTime interface.
|
|
|
If IsGmt is TRUE (non-zero), then the Day corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Day corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. If not, it is according to the local time.
|
|
||||||||||||||||
|
At the specified granularity level, get methods are called on the current time and the time passed and the difference is found. This difference is returned in the Time Period object. The other level members in the time period object are set to 0.
|
|
|
This is applicable only for dynamic time points. The current time is shifted by the number of days specified in the dynamicdayoffset and then the dynamic time point is evaluated with respect to the new current time. For example if today is March 5th, and we have a dynamic time that represents the last day of this month. If the dynamicdayoffset is set to -7, the current time is shifted back by 7 days, and the dynamic time is computed with respect to that day (which is Feb 27th if it is not a leap year). The last day of the month would then be Feb 28th.
|
|
|
This is applicable only for dynamic time points. The current time is shifted by the number of days specified in the dynamicdayoffset and then the dynamic time point is evaluated with respect to the new current time. For example if today is March 5th, and we have a dynamic time that represents the last day of this month. If the dynamicdayoffset is set to -7, the current time is shifted back by 7 days, and the dynamic time is computed with respect to that day (which is Feb 27th if it is not a leap year). The last day of the month would then be Feb 28th.
|
|
|
IDSSTime interface views time as two hierarchies of levels: Year-Month-Week-DayOfWeek-Hour-Minutes-Seconds-MilliSeconds and Year-Month-Day-Hour-Minutes-Seconds-MilliSeconds. The time represented by a dynamic time change with time. For example, the time (or date) represented by last month changes as time changes.
|
|
|
IDSSTime interface views time as two hierarchies of levels: Year-Month-Week-DayOfWeek-Hour-Minutes-Seconds-MilliSeconds and Year-Month-Day-Hour-Minutes-Seconds-MilliSeconds. The time represented by a dynamic time change with time. For example, the time (or date) represented by last month changes as time changes.
|
|
||||||||||||||||
|
The format of the date and/or time (Format) is a string pattern, with substitutable placeholders defined as follows. The pattern is case-insensitive expect for the cases of "AM/PM", "am/pm", "a/p", "A/P". In these situations, the format specifier i.e. "AM" etc. is returned with the string, hence we do not change the case. In all other situations, the case does not matter.
|
|
||||||||||||||||
|
Get an absolute time a integer number of time units before this time. EnumDSSGranularityLevel can have the values DssGranularityMilliseconds, DssGranularitySeconds, DssGranularityMinutes, DssGranularityHour, DssGranularityDay, DssGranularityMonth, DssGranularityYear, DssGranularityWeek, DssGranularityDayofweek.
|
|
||||||||||||
|
This method is applicable only for dynamic time points. It returns the shift at a particular for a dynamic point. For example, 3 days back can be represented as a dynamic time as today shifted by 3 days backwards. The shift method at the level of day would return -3.
|
|
|
If IsGmt is TRUE (non-zero), then the Hour corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Hour corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
This method should be called before any get property or method is called.
|
|
||||||||||||
|
Returns true if both the time points represent the same point of time. If not returns false. One or both of them can be dynamic.
|
|
|
The IsGmt flag being a VARIANT_BOOL can be TRUE or FALSE. The most intuitive setting is FALSE and will be the default. The IsGmt flag is just used to view a given time point according to the local time zone representation or GMT representation. The Mode flag on the other hand actually alters the nature of the time point. This is provided because, GMT is a special time zone and a user might want to see the time in this representation. Thus, when the flag is FALSE, the time is given out in the local time zone representation. A get_hour when the flag is FALSE returns the hour of the time point's representation in the local time zone. When the IsGmt flag is TRUE, the hour returned is from the represenation of the same time point in the GMT zone.
|
|
|
The IsGmt flag being a VARIANT_BOOL can be TRUE or FALSE. The most intuitive setting is FALSE and will be the default. The IsGmt flag is just used to view a given time point according to the local time zone representation or GMT representation. The Mode flag on the other hand actually alters the nature of the time point. This is provided because, GMT is a special time zone and a user might want to see the time in this representation. Thus, when the flag is FALSE, the time is given out in the local time zone representation. A get_hour when the flag is FALSE returns the hour of the time point's representation in the local time zone. When the IsGmt flag is TRUE, the hour returned is from the represenation of the same time point in the GMT zone.
|
|
||||||||||||
|
Returns true if the time represented by the current time point is after the time point represented by the time point passed. If not returns false. One or both of them can be dynamic.
|
|
||||||||||||
|
Returns true if the time represented by the current time point is before the time point represented by the time point passed. If not returns false. One or both of them can be dynamic.
|
|
|
If IsGmt is TRUE (non-zero), then the MilliSeconds correspond to time according to GMT. If not, they are according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the MilliSeconds correspond to time according to GMT. If not, they are according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Minutes correspond to time according to GMT. If not, they are according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Minutes correspond to time according to GMT. If not, they are according to the local time.
|
|
|
Mode that determines the nature of the time point. We provide time zone independence through this property. Right now Mode can be DssTimeModeLocaleSensitive or DssTimeModeLocaleInsensitive. DssTimeModeLocaleSensitive is the Mode that we expect will be used most and is most intuitive. When in this mode, time is be stored in GMT (though how they are stored is an implementation detail, it makes this explanation easier to understand) and is converted according to the local time zone of the place where the get_xxx methods are invoked. Thus, if we are on the East Coast of the US (Eastern Time which is 5.00 hrs behind GMT, ignoring daylight savings time) and we set the time to be 3.00 PM on a certain day, it is stored as 8.00 PM. When the get_xxx methods are invoked on the Western coast of the US, this time is converted to their time zone (which is 8.00hrs behind) and is equivalent to 12.00PM. Thus in this Mode, the IDSSTime interface represent a point of time which does not change with time zone i.e. the same instant of time across all time zones. We call this an Absolute Time Point.
|
|
|
Mode that determines the nature of the time point. We provide time zone independence through this property. Right now Mode can be DssTimeModeLocaleSensitive or DssTimeModeLocaleInsensitive. DssTimeModeLocaleSensitive is the Mode that we expect will be used most and is most intuitive. When in this mode, time is be stored in GMT (though how they are stored is an implementation detail, it makes this explanation easier to understand) and is converted according to the local time zone of the place where the get_xxx methods are invoked. Thus, if we are on the East Coast of the US (Eastern Time which is 5.00 hrs behind GMT, ignoring daylight savings time) and we set the time to be 3.00 PM on a certain day, it is stored as 8.00 PM. When the get_xxx methods are invoked on the Western coast of the US, this time is converted to their time zone (which is 8.00hrs behind) and is equivalent to 12.00PM. Thus in this Mode, the IDSSTime interface represent a point of time which does not change with time zone i.e. the same instant of time across all time zones. We call this an Absolute Time Point.
|
|
|
If IsGmt is TRUE (non-zero), then the Month corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Month corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
Stores a name for this time point.
|
|
|
Stores a name for this time point.
|
|
|
Populate the current time point using the time point passed.
|
|
|
If IsGmt is TRUE (non-zero), then the Seconds correspond to time according to GMT. If not, they are according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Seconds correspond to time according to GMT. If not, they are according to the local time.
|
|
||||||||||||
|
Shift the current time point by the amount of time represented by the Time Period object.
|
|
||||||||||||
|
The time point is computed from a given string.
|
|
|
If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the DayOfWeek corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Year corresponds to time according to GMT. If not, it is according to the local time.
|
|
|
If IsGmt is TRUE (non-zero), then the Year corresponds to time according to GMT. If not, it is according to the local time.
|