Public Member Functions | |
DateTime (int year, int month, int day, int hour, int minute, int second, int milliseconds, short utc_hour_offset, int utc_minute_offset) | |
Constructor, with parameters. More... | |
DateTime () | |
Constructor. | |
DateTime (DateTime dt) | |
Constructor, with another DateTime. More... | |
int | getDay () |
Get day of month. More... | |
int | getHour () |
Get hour. More... | |
int | getMilliseconds () |
Get millisecond. More... | |
int | getMinute () |
Get minute. More... | |
int | getMonth () |
Get month. More... | |
int | getSecond () |
Get second. More... | |
short | getUtc_hour_offset () |
Get hour of time zone. More... | |
int | getUtc_minute_offset () |
Get minute of time zone. More... | |
int | getYear () |
Get year. More... | |
boolean | isValid () |
Check whether current object is valid or not. More... | |
void | set (int year, int month, int day, int hour, int minute, int second, int milliseconds, short utc_hour_offset, int utc_minute_offset) |
Set value. More... | |
void | setDay (int value) |
Set day of month. More... | |
void | setHour (int value) |
Set hour. More... | |
void | setMilliseconds (int value) |
Set millisecond. More... | |
void | setMinute (int value) |
Set minute. More... | |
void | setMonth (int value) |
Set month. More... | |
void | setSecond (int value) |
Set second. More... | |
void | setUtc_hour_offset (short value) |
Set hour of time zone. More... | |
void | setUtc_minute_offset (int value) |
Set minute of time zone. More... | |
void | setYear (int value) |
Set year. 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.
com.foxit.sdk.common.DateTime.DateTime | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour, | ||
int | minute, | ||
int | second, | ||
int | milliseconds, | ||
short | utc_hour_offset, | ||
int | utc_minute_offset | ||
) |
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. |
com.foxit.sdk.common.DateTime.DateTime | ( | DateTime | dt | ) |
com.foxit.sdk.common.DateTime.getDay | ( | ) |
Get day of month.
com.foxit.sdk.common.DateTime.getHour | ( | ) |
Get hour.
|
static |
Get local time.
com.foxit.sdk.common.DateTime.getMilliseconds | ( | ) |
Get millisecond.
com.foxit.sdk.common.DateTime.getMinute | ( | ) |
Get minute.
com.foxit.sdk.common.DateTime.getMonth | ( | ) |
Get month.
com.foxit.sdk.common.DateTime.getSecond | ( | ) |
Get second.
com.foxit.sdk.common.DateTime.getUtc_hour_offset | ( | ) |
Get hour of time zone.
Positive value for the eastern time zone, and negative value for the western time zone.
com.foxit.sdk.common.DateTime.getUtc_minute_offset | ( | ) |
Get minute of time zone.
|
static |
Get UTC time.
com.foxit.sdk.common.DateTime.getYear | ( | ) |
Get year.
boolean com.foxit.sdk.common.DateTime.isValid | ( | ) |
Check whether current object is valid or not.
When the current object is not valid, that means current object is useless.
void com.foxit.sdk.common.DateTime.set | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour, | ||
int | minute, | ||
int | second, | ||
int | milliseconds, | ||
short | utc_hour_offset, | ||
int | utc_minute_offset | ||
) |
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. |
com.foxit.sdk.common.DateTime.setDay | ( | int | value | ) |
Set day of month.
[in] | day | Day of month. Valid range: from 1 to 31. |
com.foxit.sdk.common.DateTime.setHour | ( | int | value | ) |
Set hour.
[in] | hour | Hour. Valid range: from 0 to 23. |
com.foxit.sdk.common.DateTime.setMilliseconds | ( | int | value | ) |
Set millisecond.
[in] | milliseconds | Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable. |
com.foxit.sdk.common.DateTime.setMinute | ( | int | value | ) |
Set minute.
[in] | minute | Minute. Valid range: from 0 to 59. |
com.foxit.sdk.common.DateTime.setMonth | ( | int | value | ) |
Set month.
[in] | month | Month. Valid range: from 1 to 12. |
com.foxit.sdk.common.DateTime.setSecond | ( | int | value | ) |
Set second.
[in] | second | Second. Valid range: from 0 to 60. 60 for leap second. |
com.foxit.sdk.common.DateTime.setUtc_hour_offset | ( | short | value | ) |
Set hour of time zone.
Positive value for the eastern time zone, and negative value for the western time zone.
[in] | utc_hour_offset | Hour of time zone. Valid range: from -12 to 12. |
com.foxit.sdk.common.DateTime.setUtc_minute_offset | ( | int | value | ) |
Set minute of time zone.
[in] | utc_minute_offset | Minute of time zone. Valid range: from 0 to 59. |
com.foxit.sdk.common.DateTime.setYear | ( | int | value | ) |
Set year.
[in] | year | Year. It should be a four-digit number, such as 2014. |
DateTime com.foxit.sdk.common.DateTime.toLocalTime | ( | ) |
Convert current object to local time.
DateTime com.foxit.sdk.common.DateTime.toUTCTime | ( | ) |
Convert current object to UTC time.