ostk.physics.time.Date

class Date(self: ostk.physics.time.Date, arg0: int, arg1: int, arg2: int)

Bases: pybind11_object

Date as year, month and day.

Methods

GPS_epoch

GPS epoch (1980-01-06).

J2000

J2000 epoch (2000-01-01).

get_day

Get day (1 - 31).

get_month

Get month (1 - 12).

get_year

Get year (1400 - 9999).

is_defined

Check if the date is defined.

modified_julian_date_epoch

Modified julian dates epoch (1858-11-17).

parse

set_day

Set day.

set_month

Set month.

set_year

Set year.

to_string

Overloaded function.

undefined

Create an undefined date.

unix_epoch

Unix epoch (1970-01-01).

class Format(self: ostk.physics.time.Date.Format, value: int)

Bases: pybind11_object

Members:

Undefined :

Undefined date format.

Standard :

Standard date format (YYYY-MM-DD).

STK :

STK date format (d Mon YYYY).

property name
static GPS_epoch() ostk.physics.time.Date

GPS epoch (1980-01-06).

Returns:

GPS epoch.

Return type:

Date

static J2000() ostk.physics.time.Date

J2000 epoch (2000-01-01).

Returns:

J2000 epoch.

Return type:

Date

get_day(self: ostk.physics.time.Date) int

Get day (1 - 31).

Returns:

Day.

Return type:

int

get_month(self: ostk.physics.time.Date) int

Get month (1 - 12).

Returns:

Month.

Return type:

int

get_year(self: ostk.physics.time.Date) int

Get year (1400 - 9999).

Returns:

Year.

Return type:

int

is_defined(self: ostk.physics.time.Date) bool

Check if the date is defined.

Returns:

True if defined.

Return type:

bool

static modified_julian_date_epoch() ostk.physics.time.Date

Modified julian dates epoch (1858-11-17).

Returns:

Modified Julian epoch.

Return type:

Date

static parse(
aString: ostk.core.type.String,
aFormat: ostk.physics.time.Date.Format = <Format.Undefined: 0>,
) ostk.physics.time.Date
set_day(self: ostk.physics.time.Date, arg0: int) None

Set day.

Parameters:

day (int) -- Day (1 - 31).

set_month(self: ostk.physics.time.Date, arg0: int) None

Set month.

Parameters:

month (int) -- Month (1 - 12).

set_year(self: ostk.physics.time.Date, arg0: int) None

Set year.

Parameters:

year (int) -- Year (1400 - 9999).

to_string(*args, **kwargs)

Overloaded function.

  1. to_string(self: ostk.physics.time.Date, arg0: ostk::physics::time::Date::Format) -> ostk.core.type.String

    Get string representation of date.

    Args:

    format (Date.Format): Date format.

    Returns:

    str: String representation of date.

  2. to_string(self: ostk.physics.time.Date) -> ostk.core.type.String

  3. to_string(self: ostk.physics.time.Date, arg0: ostk::physics::time::Date::Format) -> ostk.core.type.String

static undefined() ostk.physics.time.Date

Create an undefined date.

Returns:

Undefined date.

Return type:

Date

static unix_epoch() ostk.physics.time.Date

Unix epoch (1970-01-01).

Returns:

Unix epoch.

Return type:

Date