Date#

class ansys.stk.core.stkutil.Date#

Object that contains a date.

Overview#

format

Return the value of the date given the unit.

set_date

Set this date with the given date value and unit type.

add

Add the value in the given unit and returns a new date interface.

subtract

Subtracts the value in the given unit and returns a new date interface.

span

Subtracts the value from the Date interface and returns an Quantity.

ole_date

Get or set the current time in OLE DATE Format.

whole_days

Get or set the Julian Day Number of the date of interest.

sec_into_day

Contains values between 0.0 and 86400 with the exception of when the date is inside a leap second in which case the SecIntoDay can become as large as 86401.0.

whole_days_utc

Get or set the UTC Day Number of the date of interest.

sec_into_day_utc

Contains values between 0.0 and 86400 with the exception of when the date is inside a leap second in which case the SecIntoDay can become as large as 86401.0.

Import detail#

from ansys.stk.core.stkutil import Date

Property detail#

property Date.ole_date: datetime#

Get or set the current time in OLE DATE Format.

property Date.whole_days: int#

Get or set the Julian Day Number of the date of interest.

property Date.sec_into_day: float#

Contains values between 0.0 and 86400 with the exception of when the date is inside a leap second in which case the SecIntoDay can become as large as 86401.0.

property Date.whole_days_utc: int#

Get or set the UTC Day Number of the date of interest.

property Date.sec_into_day_utc: float#

Contains values between 0.0 and 86400 with the exception of when the date is inside a leap second in which case the SecIntoDay can become as large as 86401.0.

Method detail#

Date.format(self, unit: str) str#

Return the value of the date given the unit.

Parameters:

unit : str

Returns:

str

Date.set_date(self, unit: str, value: str) None#

Set this date with the given date value and unit type.

Parameters:

unit : str

value : str

Returns:

None

Date.add(self, unit: str, value: float) Date#

Add the value in the given unit and returns a new date interface.

Parameters:

unit : str

value : float

Returns:

Date

Date.subtract(self, unit: str, value: float) Date#

Subtracts the value in the given unit and returns a new date interface.

Parameters:

unit : str

value : float

Returns:

Date

Date.span(self, date: Date) Quantity#

Subtracts the value from the Date interface and returns an Quantity.

Parameters:

date : Date

Returns:

Quantity