Utility methods.
More...
◆ compare()
int shift_utils.ShiftUtils.compare |
( |
time |
firstTime, |
|
|
time |
secondTime |
|
) |
| |
|
static |
Compare two times.
- Parameters
-
firstTime | First time to compare |
secondTime | Second time to compare |
- Returns
- -1 if less than, 0 if equal and 1 if greater than
◆ formatTimedelta()
str shift_utils.ShiftUtils.formatTimedelta |
( |
timedelta |
duration | ) |
|
|
static |
Format a timedelta for display.
- Parameters
-
- Returns
- days : hours : minutes
◆ toEpochDay()
int shift_utils.ShiftUtils.toEpochDay |
( |
date |
day | ) |
|
|
static |
Get the day from the Epoch for this date.
- Parameters
-
- Returns
- days since Epoch
◆ toEpochSecond()
int shift_utils.ShiftUtils.toEpochSecond |
( |
datetime |
instant | ) |
|
|
static |
Get the second from the Epoch for this datetime.
- Parameters
-
instant | Date and time of day |
- Returns
- seconds since Epoch
◆ toRoundedSecond()
int shift_utils.ShiftUtils.toRoundedSecond |
( |
time |
dayTime | ) |
|
|
static |
Get the second from the day for this time and round it.
- Parameters
-
- Returns
- rounded seconds of day
◆ toSecondOfDay()
int shift_utils.ShiftUtils.toSecondOfDay |
( |
time |
dayTime | ) |
|
|
static |
Get the second from the day for this time.
- Parameters
-
- Returns
- seconds of day
The documentation for this class was generated from the following file: