Inherits SystemIDisposable.
Public Member Functions | |
DateTime (ushort year, ushort month, ushort day, ushort hour, ushort minute, ushort second, ushort milliseconds, short utc_hour_offset, ushort utc_minute_offset) | |
Constructor, with parameters. More... | |
DateTime () | |
Constructor. | |
DateTime (DateTime dt) | |
Constructor, with another DateTime. More... | |
bool | IsValid () |
Check whether current object is valid or not. More... | |
void | Set (ushort year, ushort month, ushort day, ushort hour, ushort minute, ushort second, ushort milliseconds, short utc_hour_offset, ushort 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... | |
This class represents date, time and timezone.
|
inline |
Constructor, with parameters.
year | Year. It should be a four-digit number, such as 2014. |
month | Month. Valid range: from 1 to 12. |
day | Day of month. Valid range: from 1 to 31. |
hour | Hour. Valid range: from 0 to 23. |
minute | Minute. Valid range: from 0 to 59. |
second | Second. Valid range: from 0 to 60. 60 for leap second. |
milliseconds | Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. |
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. |
utc_minute_offset | Minute of time zone. Valid range: from 0 to 59. |
|
inline |
|
inlinestatic |
Get local time.
|
inlinestatic |
Get UTC time.
|
inline |
Check whether current object is valid or not.
When the current object is not valid, that means current object is useless.
|
inline |
Set value.
year | Year. It should be a four-digit number, such as 2014. |
month | Month. Valid range: from 1 to 12. |
day | Day of month. Valid range: from 1 to 31. |
hour | Hour. Valid range: from 0 to 23. |
minute | Minute. Valid range: from 0 to 59. |
second | Second. Valid range: from 0 to 60. 60 for leap second. |
milliseconds | Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. |
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. |
utc_minute_offset | Minute of time zone. Valid range: from 0 to 59. |
|
inline |
Convert current object to local time.
|
inline |
Convert current object to UTC time.