Foxit PDF SDK

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
FSDK.DateTime Class Reference

## Public Member Functions
| constructor ()
| Constructor.
| constructor (year, month, day, hour, minute, second, milliseconds, utc_hour_offset, utc_minute_offset)
| Constructor, with parameters. More...
| IsValid ()
| Check whether current object is valid or not. More...
| Set (year, month, day, hour, minute, second, milliseconds, utc_hour_offset, utc_minute_offset)
| Set value. More...
| ToLocalTime ()
| Convert current object to local time. More...
| ToUTCTime ()
| Convert current object to UTC time. More...

## Static Public Member Functions
static | GetLocalTime ()
| Get local time. More...
static | GetUTCTime ()
| Get UTC time. More...

## Public Attributes
| day
| Day of month. Valid range: from 1 to 31.
| hour
| Hour. Valid range: from 0 to 23.
| milliseconds
| Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable.
| minute
| Minute. Valid range: from 0 to 59.
| month
| Month. Valid range: from 1 to 12.
| second
| Second. Valid range: from 0 to 60. 60 for leap second.
| utc_hour_offset
| Hour of time zone. Valid range: from -12 to 12. More...
| utc_minute_offset
| Minute of time zone. Valid range: from 0 to 59.
| year
| Year. It should be a four-digit number, such as 2014.

## Detailed Description

This class represents date, time and timezone.

## Member Function Documentation

## ◆ constructor()

FSDK.DateTime.constructor | ( | year | ,
|  | month | ,
|  | day | ,
|  | hour | ,
|  | minute | ,
|  | second | ,
|  | milliseconds | ,
|  | utc_hour_offset | ,
|  | utc_minute_offset |
| ) |  |

Constructor, with parameters.

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.

## ◆ GetLocalTime()

static FSDK.DateTime.GetLocalTime | ( |  | ) |
| static

Get local time.

Returns
  Local time.

## ◆ GetUTCTime()

static FSDK.DateTime.GetUTCTime | ( |  | ) |
| static

Get UTC time.

Returns
  UTC time.

## ◆ IsValid()

FSDK.DateTime.IsValid | ( |  | ) |

Check whether current object is valid or not.

When the current object is not valid, that means current object is useless.

Returns
  true means current object is valid, while false means not.

## ◆ Set()

FSDK.DateTime.Set | ( | year | ,
|  | month | ,
|  | day | ,
|  | hour | ,
|  | minute | ,
|  | second | ,
|  | milliseconds | ,
|  | utc_hour_offset | ,
|  | utc_minute_offset |
| ) |  |

Set value.

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.

Returns
  None.

## ◆ ToLocalTime()

FSDK.DateTime.ToLocalTime | ( |  | ) |

Convert current object to local time.

Returns
  Refernce to current object itself.

## ◆ ToUTCTime()

FSDK.DateTime.ToUTCTime | ( |  | ) |

Convert current object to UTC time.

Returns
  Refernce to current object itself.

## Member Data Documentation

## ◆ utc_hour_offset

FSDK.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.