ostk.physics.time.DateTime

class DateTime(*args, **kwargs)

Bases: pybind11_object

Date-time.

Overloaded function.

  1. __init__(self: ostk.physics.time.DateTime, date: ostk::physics::time::Date, time: ostk::physics::time::Time) -> None

    Constructor.

    Args:

    date (Date): A date time (Time): A time

  2. __init__(self: ostk.physics.time.DateTime, year: int, month: int, day: int, hour: int = 0, minute: int = 0, second: int = 0, millisecond: int = 0, microsecond: int = 0, nanosecond: int = 0) -> None

    Constructor.

    Args:

    year (int): Year month (int): Month day (int): Day hour (int): Hour minute (int): Minute second (int): Second millisecond (int): Millisecond microsecond (int): Microsecond nanosecond (int): Nanosecond

Methods

GPS_epoch

GPS epoch (1980-01-06 00:00:00.000.000.000).

J2000

J2000 epoch (2000-01-01 12:00:00.000.000.00).

get_date

Get date.

get_julian_date

Get Julian date.

get_modified_julian_date

Get Modified Julian date.

get_time

Get time.

is_defined

Check if the date-time is defined.

julian_date

Date-time from Julian Date.

modified_julian_date

Date-time from Modified Julian Date.

modified_julian_date_epoch

Modified Julian Date epoch (1858-11-17 00:00:00.000.000.000).

parse

to_string

Overloaded function.

undefined

Create an undefined date-time.

unix_epoch

Unix epoch (1970-01-01 00:00:00.000.000.000).

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

Bases: pybind11_object

Members:

Undefined :

Undefined format.

Standard :

Standard format (YYYY:MM:DD hh:mm:ss.sss.sss.sss).

ISO8601 :

ISO 8601 format (YYYY-MM-DDThh:mm:ss.ssssss).

STK :

STK format (d Mon YYYY hh:mm:ss.ssssss).

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

GPS epoch (1980-01-06 00:00:00.000.000.000).

Returns:

Date-time at GPS epoch.

Return type:

DateTime

static J2000() ostk.physics.time.DateTime

J2000 epoch (2000-01-01 12:00:00.000.000.00).

Returns:

J2000 date-time.

Return type:

DateTime

get_date(self: ostk.physics.time.DateTime) ostk::physics::time::Date

Get date.

Returns:

Date.

Return type:

Date

get_julian_date(self: ostk.physics.time.DateTime) ostk.core.type.Real

Get Julian date.

Returns:

Julian date.

Return type:

float

get_modified_julian_date(
self: ostk.physics.time.DateTime,
) ostk.core.type.Real

Get Modified Julian date.

Returns:

Modified Julian date.

Return type:

float

get_time(self: ostk.physics.time.DateTime) ostk::physics::time::Time

Get time.

Returns:

Time.

Return type:

Time

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

Check if the date-time is defined.

Returns:

True if defined.

Return type:

bool

static julian_date(julian_date: ostk.core.type.Real) ostk.physics.time.DateTime

Date-time from Julian Date.

Parameters:

julian_date (float) -- A Julian Date.

Returns:

Date-time.

Return type:

DateTime

static modified_julian_date(
modified_julian_date: ostk.core.type.Real,
) ostk.physics.time.DateTime

Date-time from Modified Julian Date.

Parameters:

modified_julian_date (float) -- A Modified Julian Date.

Returns:

Date-time.

Return type:

DateTime

static modified_julian_date_epoch() ostk.physics.time.DateTime

Modified Julian Date epoch (1858-11-17 00:00:00.000.000.000).

Returns:

Date-time at Modified Julian Date epoch.

Return type:

Date-time

static parse(
string: ostk.core.type.String,
format: ostk.physics.time.DateTime.Format = <Format.Undefined: 0>,
) ostk.physics.time.DateTime
to_string(*args, **kwargs)

Overloaded function.

  1. to_string(self: ostk.physics.time.DateTime) -> ostk.core.type.String

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

static undefined() ostk.physics.time.DateTime

Create an undefined date-time.

Returns:

Undefined date-time.

Return type:

DateTime

static unix_epoch() ostk.physics.time.DateTime

Unix epoch (1970-01-01 00:00:00.000.000.000).

Returns:

Date-time at Unix epoch.

Return type:

DateTime