ostk.physics.time.Time

class Time(*args, **kwargs)

Bases: pybind11_object

Time as hour, minute, second, millisecond, microsecond and nanosecond.

Overloaded function.

  1. __init__(self: ostk.physics.time.Time, arg0: int, arg1: int, arg2: int, arg3: int, arg4: int, arg5: int) -> None

    Constructor.

    Args:

    an_hour (int): An hour count (0 - 23). a_minute (int): A minute count (0 - 59). a_second (int): A second count (0 - 60). a_millisecond (int): A millisecond count (0 - 999). a_microsecond (int): A microsecond count (0 - 999). a_nanosecond (int): A nanosecond count (0 - 999).

  2. __init__(self: ostk.physics.time.Time, arg0: int, arg1: int, arg2: int) -> None

    Constructor.

    Args:

    an_hour (int): An hour count (0 - 23). a_minute (int): A minute count (0 - 59). a_second (int): A second count (0 - 60).

Methods

get_floating_seconds

Get floating seconds.

get_hour

Get hour count.

get_microsecond

Get microsecond count.

get_millisecond

Get millisecond count.

get_minute

Get minute count.

get_nanosecond

Get nanosecond count.

get_second

Get second count.

get_total_floating_hours

Get total floating hours.

get_total_floating_seconds

Get total floating seconds.

hours

Create a time from a real number of hours.

is_defined

Check if the time is defined.

midnight

Create a time at midnight.

noon

Create a time at noon.

parse

Create a time from a string representation.

seconds

Create a time from a real number of seconds.

set_hour

Set hour count.

set_microsecond

Set microsecond count.

set_millisecond

Set millisecond count.

set_minute

Set minute count.

set_nanosecond

Set nanosecond count.

set_second

Set second count.

to_string

Overloaded function.

undefined

Create an undefined time.

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

Bases: pybind11_object

Members:

Undefined :

Undefined time format.

Standard :

Standard time format.

ISO8601 :

ISO 8601 time format.

property name
get_floating_seconds(self: ostk.physics.time.Time) ostk.core.type.Real

Get floating seconds.

Returns:

Floating seconds.

Return type:

float

get_hour(self: ostk.physics.time.Time) int

Get hour count.

Returns:

Hour count.

Return type:

int

get_microsecond(self: ostk.physics.time.Time) int

Get microsecond count.

Returns:

Microsecond count.

Return type:

int

get_millisecond(self: ostk.physics.time.Time) int

Get millisecond count.

Returns:

Millisecond count.

Return type:

int

get_minute(self: ostk.physics.time.Time) int

Get minute count.

Returns:

Minute count.

Return type:

int

get_nanosecond(self: ostk.physics.time.Time) int

Get nanosecond count.

Returns:

Nanosecond count.

Return type:

int

get_second(self: ostk.physics.time.Time) int

Get second count.

Returns:

Second count.

Return type:

int

get_total_floating_hours(self: ostk.physics.time.Time) ostk.core.type.Real

Get total floating hours.

Returns:

Total floating hours.

Return type:

float

get_total_floating_seconds(self: ostk.physics.time.Time) ostk.core.type.Real

Get total floating seconds.

Returns:

Total floating seconds.

Return type:

float

static hours(value: ostk.core.type.Real) ostk.physics.time.Time

Create a time from a real number of hours.

Parameters:

value (float) -- A real number of hours.

Returns:

Time.

Return type:

Time

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

Check if the time is defined.

Returns:

True if defined

Return type:

bool

static midnight() ostk.physics.time.Time

Create a time at midnight.

Returns:

Time at midnight.

Return type:

Time

static noon() ostk.physics.time.Time

Create a time at noon.

Returns:

Time at noon.

Return type:

Time

static parse(
string: ostk.core.type.String,
format: ostk.physics.time.Time.Format = <Format.Undefined: 0>,
) ostk.physics.time.Time

Create a time from a string representation.

Parameters:
  • string (str) -- A string.

  • format (Time.Format, optional) -- A time format (automatic detection if Undefined).

Returns:

Time.

Return type:

Time

static seconds(value: ostk.core.type.Real) ostk.physics.time.Time

Create a time from a real number of seconds.

Parameters:

value (float) -- A real number of seconds.

Returns:

Time.

Return type:

Time

set_hour(self: ostk.physics.time.Time, arg0: int) None

Set hour count.

Parameters:

an_hour (int) -- An hour count (0 - 23).

set_microsecond(self: ostk.physics.time.Time, arg0: int) None

Set microsecond count.

Parameters:

a_microsecond (int) -- A microsecond count (0 - 999).

set_millisecond(self: ostk.physics.time.Time, arg0: int) None

Set millisecond count.

Parameters:

a_millisecond (int) -- A millisecond count (0 - 999).

set_minute(self: ostk.physics.time.Time, arg0: int) None

Set minute count.

Parameters:

a_minute (int) -- A minute count (0 - 59).

set_nanosecond(self: ostk.physics.time.Time, arg0: int) None

Set nanosecond count.

Parameters:

a_nanosecond (int) -- A nanosecond count (0 - 999).

set_second(self: ostk.physics.time.Time, arg0: int) None

Set second count.

Parameters:

a_second (int) -- A second count (0 - 60).

to_string(*args, **kwargs)

Overloaded function.

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

    Get string representation of time.

    Returns:

    str: String representation of time.

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

    Get string representation of time.

    Returns:

    str: String representation of time.

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

    Get string representation of time.

    Args:

    aFormat (Time.Format): Time format.

    Returns:

    str: String representation of time.

static undefined() ostk.physics.time.Time

Create an undefined time.

Returns:

Undefined time.

Return type:

Time