ostk.physics.time.Date

class Date(self, arg0: int, arg1: int, arg2: int, /)

Bases: object

Date as year, month and day.

Attributes

GPS_epoch

J2000

get_day

Get day (1 - 31).

get_month

Get month (1 - 12).

get_year

Get year (1400 - 9999).

modified_julian_date_epoch

parse

replace

Copy the date, replacing the provided components.

set_day

Set day.

set_month

Set month.

set_year

Set year.

to_string

Overloaded function.

unix_epoch

class Format(
value,
names=None,
*,
module=None,
qualname=None,
type=None,
start=1,
boundary=None,
)

Bases: Enum

Standard = 0
STK = 1
GPS_epoch = <nanobind.nb_func object>
J2000 = <nanobind.nb_func object>
get_day

Get day (1 - 31).

Returns:

Day.

Return type:

int

get_month

Get month (1 - 12).

Returns:

Month.

Return type:

int

get_year

Get year (1400 - 9999).

Returns:

Year.

Return type:

int

modified_julian_date_epoch = <nanobind.nb_func object>
parse = <nanobind.nb_func object>
replace

Copy the date, replacing the provided components.

Parameters:
  • year (int | None, optional) -- Year (1400 - 9999). Defaults to the already existing year of this Date instance.

  • month (int | None, optional) -- Month (1 - 12). Defaults to the already existing month of this Date instance.

  • day (int | None, optional) -- Day (1 - 31). Defaults to the already existing day of this Date instance.

Returns:

Date.

Return type:

Date

set_day

Set day.

Parameters:

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

set_month

Set month.

Parameters:

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

set_year

Set year.

Parameters:

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

to_string

Overloaded function.

  1. to_string(self, arg: 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.core.type.String

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

unix_epoch = <nanobind.nb_func object>