ostk.physics.time.Time

class Time(self, arg0: int, arg1: int, arg2: int, arg3: int, arg4: int, arg5: int, /)
class Time(self, arg0: int, arg1: int, arg2: int, /)

Bases: object

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

Overloaded function.

  1. __init__(self, 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, 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).

Attributes

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

midnight

noon

parse

replace

Copy the time, replacing the provided components.

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.

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

Bases: Enum

Standard = 0
ISO8601 = 1
get_floating_seconds

Get floating seconds.

Returns:

Floating seconds.

Return type:

float

get_hour

Get hour count.

Returns:

Hour count.

Return type:

int

get_microsecond

Get microsecond count.

Returns:

Microsecond count.

Return type:

int

get_millisecond

Get millisecond count.

Returns:

Millisecond count.

Return type:

int

get_minute

Get minute count.

Returns:

Minute count.

Return type:

int

get_nanosecond

Get nanosecond count.

Returns:

Nanosecond count.

Return type:

int

get_second

Get second count.

Returns:

Second count.

Return type:

int

get_total_floating_hours

Get total floating hours.

Returns:

Total floating hours.

Return type:

float

get_total_floating_seconds

Get total floating seconds.

Returns:

Total floating seconds.

Return type:

float

hours = <nanobind.nb_func object>
midnight = <nanobind.nb_func object>
noon = <nanobind.nb_func object>
parse = <nanobind.nb_func object>
replace

Copy the time, replacing the provided components.

Parameters:
  • hour (int | None, optional) -- Hour count (0 - 23). Defaults to the already existing hour of this Time instance.

  • minute (int | None, optional) -- Minute count (0 - 59). Defaults to the already existing minute of this Time instance.

  • second (int | None, optional) -- Second count (0 - 60). Defaults to the already existing second of this Time instance.

  • millisecond (int | None, optional) -- Millisecond count (0 - 999). Defaults to the already existing millisecond of this Time instance.

  • microsecond (int | None, optional) -- Microsecond count (0 - 999). Defaults to the already existing microsecond of this Time instance.

  • nanosecond (int | None, optional) -- Nanosecond count (0 - 999). Defaults to the already existing nanosecond of this Time instance.

Returns:

Time.

Return type:

Time

seconds = <nanobind.nb_func object>
set_hour

Set hour count.

Parameters:

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

set_microsecond

Set microsecond count.

Parameters:

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

set_millisecond

Set millisecond count.

Parameters:

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

set_minute

Set minute count.

Parameters:

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

set_nanosecond

Set nanosecond count.

Parameters:

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

set_second

Set second count.

Parameters:

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

to_string

Overloaded function.

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

    Get string representation of time.

    Returns:

    str: String representation of time.

  3. to_string(self, arg: 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.