Foxit PDF SDK
FoxitPDFSDKPython2.DateTime Class Reference

Inherits FoxitPDFSDKPython2._object.

Public Member Functions

def DateTime ()
 Constructor.

 
def DateTime (dt)
 Constructor, with another date and time object.
More...
 
def IsValid ()
 Check whether current object is valid or not.
More...
 
def Set (year, month, day, hour, minute, second, milliseconds, utc_hour_offset, utc_minute_offset)
 Set value.
More...
 
def ToLocalTime ()
 Convert current object to local time.
More...
 
def ToUTCTime ()
 Convert current object to UTC time.
More...
 

Static Public Member Functions

def GetLocalTime ()
 Get local time.
More...
 
def GetUTCTime ()
 Get UTC time.
More...
 

Static Public Attributes

 day = _fsdk.DateTime_day
 Day of month. Valid range: from 1 to 31.

 
 hour = _fsdk.DateTime_hour
 Hour. Valid range: from 0 to 23.

 
 milliseconds = _fsdk.DateTime_milliseconds
 Millisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable.

 
 minute = _fsdk.DateTime_minute
 Minute. Valid range: from 0 to 59.

 
 month = _fsdk.DateTime_month
 Month. Valid range: from 1 to 12.

 
 second = _fsdk.DateTime_second
 Second. Valid range: from 0 to 60. 60 for leap second.

 
 utc_hour_offset = _fsdk.DateTime_utc_hour_offset
 Hour of time zone. Valid range: from -12 to 12.
More...
 
 utc_minute_offset = _fsdk.DateTime_utc_minute_offset
 Minute of time zone. Valid range: from 0 to 59.

 
 year = _fsdk.DateTime_year
 Year. It should be a four-digit number, such as 2014.

 

Detailed Description

This class represents date, time and timezone.

Constructor & Destructor Documentation

◆ DateTime()

def FoxitPDFSDKPython2.DateTime.DateTime (   dt)

Constructor, with another date and time object.

Parameters
[in]dtAnother date and time object.

Member Function Documentation

◆ GetLocalTime()

FoxitPDFSDKPython2.DateTime.GetLocalTime ( )
static

Get local time.

Returns
Local time.

◆ GetUTCTime()

FoxitPDFSDKPython2.DateTime.GetUTCTime ( )
static

Get UTC time.

Returns
UTC time.

◆ IsValid()

def FoxitPDFSDKPython2.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()

def FoxitPDFSDKPython2.DateTime.Set (   year,
  month,
  day,
  hour,
  minute,
  second,
  milliseconds,
  utc_hour_offset,
  utc_minute_offset 
)

Set value.

Parameters
[in]yearYear. It should be a four-digit number, such as 2014.
[in]monthMonth. Valid range: from 1 to 12.
[in]dayDay of month. Valid range: from 1 to 31.
[in]hourHour. Valid range: from 0 to 23.
[in]minuteMinute. Valid range: from 0 to 59.
[in]secondSecond. Valid range: from 0 to 60. 60 for leap second.
[in]millisecondsMillisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable.
[in]utc_hour_offsetHour 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_offsetMinute of time zone. Valid range: from 0 to 59.
Returns
None.

◆ ToLocalTime()

def FoxitPDFSDKPython2.DateTime.ToLocalTime ( )

Convert current object to local time.

Returns
Refernce to current object itself.

◆ ToUTCTime()

def FoxitPDFSDKPython2.DateTime.ToUTCTime ( )

Convert current object to UTC time.

Returns
Refernce to current object itself.

Member Data Documentation

◆ utc_hour_offset

FoxitPDFSDKPython2.DateTime.utc_hour_offset = _fsdk.DateTime_utc_hour_offset
static

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.