Foxit PDF SDK
fsdk.DateTime Class Reference

Public Member Functions

def GetDay ()
 Get day of month. More...
 
def GetHour ()
 Get hour. More...
 
def GetMilliseconds ()
 Get millisecond. More...
 
def GetMinute ()
 Get minute. More...
 
def GetMonth ()
 Get month. More...
 
def GetSecond ()
 Get second. More...
 
def GetUtc_hour_offset ()
 Get hour of time zone. More...
 
def GetUtc_minute_offset ()
 Get minute of time zone. More...
 
def GetYear ()
 Get year. 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 SetDay (value)
 Set day of month. More...
 
def SetHour (value)
 Set hour. More...
 
def SetMilliseconds (value)
 Set millisecond. More...
 
def SetMinute (value)
 Set minute. More...
 
def SetMonth (value)
 Set month. More...
 
def SetSecond (value)
 Set second. More...
 
def SetUtc_hour_offset (value)
 Set hour of time zone. More...
 
def SetUtc_minute_offset (value)
 Set minute of time zone. More...
 
def SetYear (value)
 Set year. More...
 
def ToLocalTime ()
 Convert current object to local time. More...
 
def ToUTCTime ()
 Convert current object to UTC time. More...
 

Detailed Description

This class represents date, time and timezone.

Member Function Documentation

◆ GetDay()

fsdk.DateTime.GetDay ( )

Get day of month.

Returns
Day of month. Valid range: from 1 to 31.

◆ GetHour()

fsdk.DateTime.GetHour ( )

Get hour.

Returns
Hour. Valid range: from 0 to 23.

◆ GetMilliseconds()

fsdk.DateTime.GetMilliseconds ( )

Get millisecond.

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

◆ GetMinute()

fsdk.DateTime.GetMinute ( )

Get minute.

Returns
Minute. Valid range: from 0 to 59.

◆ GetMonth()

fsdk.DateTime.GetMonth ( )

Get month.

Returns
Month. Valid range: from 1 to 12.

◆ GetSecond()

fsdk.DateTime.GetSecond ( )

Get second.

Returns
Second. Valid range: from 0 to 60. 60 for leap second.

◆ GetUtc_hour_offset()

fsdk.DateTime.GetUtc_hour_offset ( )

Get hour of time zone.

Positive value for the eastern time zone, and negative value for the western time zone.

Returns
Hour of time zone. Valid range: from -12 to 12.

◆ GetUtc_minute_offset()

fsdk.DateTime.GetUtc_minute_offset ( )

Get minute of time zone.

Returns
Minute of time zone. Valid range: from 0 to 59.

◆ GetYear()

fsdk.DateTime.GetYear ( )

Get year.

Returns
Year. It should be a four-digit number, such as 2014.

◆ IsValid()

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

def fsdk.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.

◆ SetDay()

fsdk.DateTime.SetDay (   value)

Set day of month.

Parameters
[in]valueDay of month. Valid range: from 1 to 31.
Returns
None.

◆ SetHour()

fsdk.DateTime.SetHour (   value)

Set hour.

Parameters
[in]valueHour. Valid range: from 0 to 23.
Returns
None.

◆ SetMilliseconds()

fsdk.DateTime.SetMilliseconds (   value)

Set millisecond.

Parameters
[in]valueMillisecond. Valid range: from 0 to 999. PDF standard does not support now, this can be omitted if it is not applicable.
Returns
None.

◆ SetMinute()

fsdk.DateTime.SetMinute (   value)

Set minute.

Parameters
[in]valueMinute. Valid range: from 0 to 59.
Returns
None.

◆ SetMonth()

fsdk.DateTime.SetMonth (   value)

Set month.

Parameters
[in]valueMonth. Valid range: from 1 to 12.
Returns
None.

◆ SetSecond()

fsdk.DateTime.SetSecond (   value)

Set second.

Parameters
[in]valueSecond. Valid range: from 0 to 60. 60 for leap second.
Returns
None.

◆ SetUtc_hour_offset()

fsdk.DateTime.SetUtc_hour_offset (   value)

Set hour of time zone.

Positive value for the eastern time zone, and negative value for the western time zone.

Parameters
[in]valueHour of time zone. Valid range: from -12 to 12.
Returns
None.

◆ SetUtc_minute_offset()

fsdk.DateTime.SetUtc_minute_offset (   value)

Set minute of time zone.

Parameters
[in]valueMinute of time zone. Valid range: from 0 to 59.
Returns
None.

◆ SetYear()

fsdk.DateTime.SetYear (   value)

Set year.

Parameters
[in]valueYear. It should be a four-digit number, such as 2014.
Returns
None.

◆ ToLocalTime()

def fsdk.DateTime.ToLocalTime ( )

Convert current object to local time.

Returns
Refernce to current object itself.

◆ ToUTCTime()

def fsdk.DateTime.ToUTCTime ( )

Convert current object to UTC time.

Returns
Refernce to current object itself.