|
Foxit PDF SDK
|
Inherits Object.
Public Member Functions | |
| DateTime (uint16 year, uint16 month, uint16 day, uint16 hour, uint16 minute, uint16 second, uint16 milliseconds, int16 utc_hour_offset, uint16 utc_minute_offset) | |
| Constructor, with parameters. More... | |
| DateTime () | |
| Constructor. | |
| DateTime (const FXCRT_DATETIMEZONE &time) | |
| Constructor, with FXCRT_DATETIMEZONE object. More... | |
| DateTime (const DateTime &dt) | |
| Constructor, with another date and time object. More... | |
| DateTime (const SYSTEMTIME &systime) | |
| Constructor, with SYSTEMTIME in Windows. More... | |
| bool | IsValid () const |
| Check whether current object is valid or not. More... | |
| bool | operator != (const DateTime &datetime) const |
| Not equal operator. More... | |
| bool | operator > (const DateTime &datetime) const |
| Greater operator. More... | |
| bool | operator >= (const DateTime &datetime) const |
| Greater or equal operator. More... | |
| operator FXCRT_DATETIMEZONE () const | |
| Convert to a FXCRT_DATETIMEZONE object. | |
| operator SYSTEMTIME () const | |
| Convert to SYSTEMTIME in Windows. | |
| bool | operator< (const DateTime &datetime) const |
| Smaller operator. More... | |
| bool | operator<= (const DateTime &datetime) const |
| Smaller or equal operator. More... | |
| DateTime & | operator= (const DateTime &dt) |
| Assign operator. More... | |
| bool | operator== (const DateTime &datetime) const |
| Equal operator. More... | |
| void | Set (uint16 year, uint16 month, uint16 day, uint16 hour, uint16 minute, uint16 second, uint16 milliseconds, int16 utc_hour_offset, uint16 utc_minute_offset) |
| Set value. More... | |
| DateTime & | ToLocalTime () |
| Convert current object to local time. More... | |
| DateTime & | ToUTCTime () |
| Convert current object to UTC time. More... | |
Static Public Member Functions | |
| static DateTime | GetLocalTime () |
| Get local time. More... | |
| static DateTime | GetUTCTime () |
| Get UTC time. More... | |
Public Attributes | |
| uint16 | day |
| Day of month. Valid range: from 1 to 31. | |
| uint16 | hour |
| Hour. Valid range: from 0 to 23. | |
| uint16 | milliseconds |
| Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. | |
| uint16 | minute |
| Minute. Valid range: from 0 to 59. | |
| uint16 | month |
| Month. Valid range: from 1 to 12. | |
| uint16 | second |
| Second. Valid range: from 0 to 60. 60 for leap second. | |
| int16 | utc_hour_offset |
| Hour of time zone. Valid range: from -12 to 12. More... | |
| uint16 | utc_minute_offset |
| Minute of time zone. Valid range: from 0 to 59. | |
| uint16 | year |
| Year. It should be a four-digit number, such as 2014. | |
This class represents date, time and timezone.
|
inline |
Constructor, with parameters.
| [in] | year | Year. It should be a four-digit number, such as 2014. |
| [in] | month | Month. Valid range: from 1 to 12. |
| [in] | day | Day of month. Valid range: from 1 to 31. |
| [in] | hour | Hour. Valid range: from 0 to 23. |
| [in] | minute | Minute. Valid range: from 0 to 59. |
| [in] | second | Second. Valid range: from 0 to 60. 60 for leap second. |
| [in] | milliseconds | Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. |
| [in] | utc_hour_offset | Hour of time zone. Valid range: from -12 to 12. Positive value for the eastern time zone, and negative value for the western time zone. |
| [in] | utc_minute_offset | Minute of time zone. Valid range: from 0 to 59. |
|
explicit |
Constructor, with FXCRT_DATETIMEZONE object.
| [in] | time | A FXCRT_DATETIMEZONE object. |
|
inline |
Constructor, with another date and time object.
| [in] | dt | Another date and time object. |
|
inlineexplicit |
Constructor, with SYSTEMTIME in Windows.
| [in] | systime | A SYSTEMTIME object |
|
static |
Get local time.
|
static |
Get UTC time.
| bool foxit::DateTime::IsValid | ( | ) | const |
Check whether current object is valid or not.
When the current object is not valid, that means current object is useless.
| bool foxit::DateTime::operator != | ( | const DateTime & | datetime | ) | const |
Not equal operator.
| [in] | datetime | Another date and time object. This function will check if current object is not equal to this one. |
| bool foxit::DateTime::operator > | ( | const DateTime & | datetime | ) | const |
Greater operator.
| [in] | datetime | Another date and time object. This function will check if current object is greater than this one. |
| bool foxit::DateTime::operator >= | ( | const DateTime & | datetime | ) | const |
Greater or equal operator.
| [in] | datetime | Another date and time object. This function will check if current object is greater than or equal to this one. |
| bool foxit::DateTime::operator< | ( | const DateTime & | datetime | ) | const |
Smaller operator.
| [in] | datetime | Another date and time object. This function will check if current object is smaller than this one. |
| bool foxit::DateTime::operator<= | ( | const DateTime & | datetime | ) | const |
Smaller or equal operator.
Smaller or equal operator.
| [in] | datetime | Another date and time object. This function will check if current object is smaller than or equal to this one. |
Assign operator.
| [in] | dt | Another date and time object, whose value would be assigned to current object. |
| bool foxit::DateTime::operator== | ( | const DateTime & | datetime | ) | const |
Equal operator.
| [in] | datetime | Another date and time object. This function will check if current object is equal to this one. |
|
inline |
Set value.
| [in] | year | Year. It should be a four-digit number, such as 2014. |
| [in] | month | Month. Valid range: from 1 to 12. |
| [in] | day | Day of month. Valid range: from 1 to 31. |
| [in] | hour | Hour. Valid range: from 0 to 23. |
| [in] | minute | Minute. Valid range: from 0 to 59. |
| [in] | second | Second. Valid range: from 0 to 60. 60 for leap second. |
| [in] | milliseconds | Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. |
| [in] | utc_hour_offset | Hour of time zone. Valid range: from -12 to 12. Positive value for the eastern time zone, and negative value for the western time zone. |
| [in] | utc_minute_offset | Minute of time zone. Valid range: from 0 to 59. |
| DateTime& foxit::DateTime::ToLocalTime | ( | ) |
Convert current object to local time.
| DateTime& foxit::DateTime::ToUTCTime | ( | ) |
Convert current object to UTC time.
| int16 foxit::DateTime::utc_hour_offset |
Hour of time zone. Valid range: from -12 to 12.
Positive value for the eastern time zone, and negative value for the western time zone.