ostk.physics.time.Time¶
- class Time(*args, **kwargs)¶
Bases:
pybind11_object
Time as hour, minute, second, millisecond, microsecond and nanosecond.
Overloaded function.
__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).
__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 hour count.
Get microsecond count.
Get millisecond count.
Get minute count.
Get nanosecond count.
Get second count.
Get total floating hours.
Get total floating seconds.
Create a time from a real number of hours.
Check if the time is defined.
Create a time at midnight.
Create a time at noon.
Create a time from a string representation.
Create a time from a real number of seconds.
Set hour count.
Set microsecond count.
Set millisecond count.
Set minute count.
Set nanosecond count.
Set second count.
Overloaded function.
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:
- get_hour(self: ostk.physics.time.Time) int ¶
Get hour count.
- Returns:
Hour count.
- Return type:
- get_microsecond(self: ostk.physics.time.Time) int ¶
Get microsecond count.
- Returns:
Microsecond count.
- Return type:
- get_millisecond(self: ostk.physics.time.Time) int ¶
Get millisecond count.
- Returns:
Millisecond count.
- Return type:
- get_minute(self: ostk.physics.time.Time) int ¶
Get minute count.
- Returns:
Minute count.
- Return type:
- get_nanosecond(self: ostk.physics.time.Time) int ¶
Get nanosecond count.
- Returns:
Nanosecond count.
- Return type:
- get_second(self: ostk.physics.time.Time) int ¶
Get second count.
- Returns:
Second count.
- Return type:
- get_total_floating_hours(self: ostk.physics.time.Time) ostk.core.type.Real ¶
Get total floating hours.
- Returns:
Total floating hours.
- Return type:
- get_total_floating_seconds(self: ostk.physics.time.Time) ostk.core.type.Real ¶
Get total floating seconds.
- Returns:
Total floating seconds.
- Return type:
- static hours(value: ostk.core.type.Real) ostk.physics.time.Time ¶
Create a time from a real number of hours.
- is_defined(self: ostk.physics.time.Time) bool ¶
Check if the time is defined.
- Returns:
True if defined
- Return type:
- static midnight() ostk.physics.time.Time ¶
Create a time at midnight.
- Returns:
Time at midnight.
- Return type:
- static noon() ostk.physics.time.Time ¶
Create a time at noon.
- Returns:
Time at noon.
- Return type:
- static parse(
- string: ostk.core.type.String,
- format: ostk.physics.time.Time.Format = <Format.Undefined: 0>,
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:
- static seconds(value: ostk.core.type.Real) ostk.physics.time.Time ¶
Create a time from a real number of seconds.
- 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.
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.
to_string(self: ostk.physics.time.Time) -> ostk.core.type.String
Get string representation of time.
- Returns:
str: String representation of time.
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: