Date#

class ansys.stk.core.stkutil.Date#

Object that contains a date.

Overview#

add

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

format

Return the value of the date given the unit.

set_date

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

span

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

subtract

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

ole_date

Get or set the current time in OLE DATE Format.

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.

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.

whole_days

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

whole_days_utc

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

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

property Date.whole_days: int#

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

property Date.whole_days_utc: int#

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

Method detail#

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.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.span(self, date: Date) Quantity#

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

Parameters:

date : Date

Returns:

Quantity

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