ostk.physics.unit.Time

class Time(
self: ostk.physics.unit.Time,
arg0: ostk.core.type.Real,
arg1: ostk::physics::unit::Time::Unit,
)

Bases: pybind11_object

Time.

https://en.wikipedia.org/wiki/Unit_of_time

Constructor.

Parameters:
  • aReal (Real) -- A real number.

  • aUnit (Time.Unit) -- A time unit.

Methods

is_defined

Check if the time is defined.

string_from_unit

Get the string representation from a time unit.

symbol_from_unit

Get the symbol representation from a time unit.

to_string

Convert time to string.

undefined

Create an undefined time.

class Unit(self: ostk.physics.unit.Time.Unit, value: int)

Bases: pybind11_object

Members:

Undefined :

Undefined time unit.

Nanosecond :

Nanosecond.

Microsecond :

Microsecond.

Millisecond :

Millisecond.

Second :

Second (SI).

Minute :

Minute.

Hour :

Hour.

Day :

Day.

Week :

Week.

property name
is_defined(self: ostk.physics.unit.Time) bool

Check if the time is defined.

Returns:

True if defined.

Return type:

bool

static string_from_unit(arg0: ostk::physics::unit::Time::Unit) ostk.core.type.String

Get the string representation from a time unit.

Parameters:

aUnit (Time.Unit) -- A time unit.

Returns:

String representation.

Return type:

str

static symbol_from_unit(arg0: ostk::physics::unit::Time::Unit) ostk.core.type.String

Get the symbol representation from a time unit.

Parameters:

aUnit (Time.Unit) -- A time unit.

Returns:

Symbol representation.

Return type:

str

to_string(
self: ostk.physics.unit.Time,
aPrecision: ostk.core.type.Integer = Undefined,
) ostk.core.type.String

Convert time to string.

Parameters:

aPrecision (int) -- A precision.

Returns:

String representation.

Return type:

str

static undefined() ostk.physics.unit.Time

Create an undefined time.

Returns:

An undefined time.

Return type:

Time