Time#

class relsad.Time.Time(quantity: float, unit: relsad.Time.TimeUnit = TimeUnit.HOUR)[source]#

Time utility class

SEC_per_MIN#

Seconds in a minute

Type

float

MIN_per_HOUR#

Minutes in an hour

Type

float

HOUR_per_DAY#

Hours in a day

Type

float

DAY_per_WEEK#

Days in a week

Type

float

WEEK_per_MONTH#

Weeks in a month

Type

float

MONTH_per_YEAR#

Months in a year

Type

float

quantity#

Time quantity, the quantity of a time unit

Type

float

unit#

The time unit

Type

TimeUnit

convert_unit(unit)[source]#

Converts the time based on the sat time unit to the correct time

get_unit_quantity(unit)[source]#

Returns the time quantity of the class instance in the given unit

get_seconds()[source]#

Returns the time quantity in seconds

get_minutes()[source]#

Returns the time quantity in minutes

get_hours()[source]#

Returns the time quantity in hours

get_days()[source]#

Returns the time quantity in days

get_months()[source]#

Returns the time quantity in months

get_years()[source]#

Returns the time quantity in year

Time.convert_unit(unit)

Converts the time based on the sat time unit to the correct time

Time.get_days()

Returns the time quantity in days

Time.get_hours()

Returns the time quantity in hours

Time.get_minutes()

Returns the time quantity in minutes

Time.get_months()

Returns the time quantity in months

Time.get_seconds()

Returns the time quantity in seconds

Time.get_unit_quantity(unit)

Returns the time quantity of the class instance in the given unit

Time.get_weeks()

Returns the time quantity in weeks

Time.get_years()

Returns the time quantity in years

Time.DAY_per_WEEK

Time.HOUR_per_DAY

Time.MIN_per_HOUR

Time.MONTH_per_YEAR

Time.SEC_per_MIN

Time.WEEK_per_MONTH