|
Foxit PDF SDK
|
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 date and time object. More... | |
| synchronized void | delete () |
| Clean up related resources immediately. 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.
| [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. |
| com.foxit.sdk.common.DateTime.DateTime | ( | DateTime | dt | ) |
Constructor, with another date and time object.
| [in] | dt | Another date and time object. |
| synchronized void com.foxit.sdk.common.DateTime.delete | ( | ) |
Clean up related resources immediately.
| 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.
| [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. |
| com.foxit.sdk.common.DateTime.setDay | ( | int | value | ) |
Set day of month.
| [in] | value | Day of month. Valid range: from 1 to 31. |
| com.foxit.sdk.common.DateTime.setHour | ( | int | value | ) |
Set hour.
| [in] | value | Hour. Valid range: from 0 to 23. |
| com.foxit.sdk.common.DateTime.setMilliseconds | ( | int | value | ) |
Set millisecond.
| [in] | value | 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] | value | Minute. Valid range: from 0 to 59. |
| com.foxit.sdk.common.DateTime.setMonth | ( | int | value | ) |
Set month.
| [in] | value | Month. Valid range: from 1 to 12. |
| com.foxit.sdk.common.DateTime.setSecond | ( | int | value | ) |
Set second.
| [in] | value | 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] | value | 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] | value | Minute of time zone. Valid range: from 0 to 59. |
| com.foxit.sdk.common.DateTime.setYear | ( | int | value | ) |
Set year.
| [in] | value | 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.