Class TimePeriod is a named period of time with a specified duration and starting time of day.
More...
|
int | SECONDS_PER_DAY = 24 * 60 * 60 |
|
Class TimePeriod is a named period of time with a specified duration and starting time of day.
◆ __init__()
def time_period.TimePeriod.__init__ |
( |
|
self, |
|
|
str |
name, |
|
|
str |
description, |
|
|
datetime |
startTime, |
|
|
timedelta |
duration |
|
) |
| |
Construct a time period.
- Parameters
-
name | Name of period |
description | Description of period |
startTime | Starting date and time of day |
duration | Duration of time period |
◆ getEndTime()
time time_period.TimePeriod.getEndTime |
( |
|
self | ) |
|
Get period end.
- Returns
- End time of day
◆ setDuration()
def time_period.TimePeriod.setDuration |
( |
|
self, |
|
|
timedelta |
duration |
|
) |
| |
Set duration.
- Parameters
-
duration | period duration as timedelta |
◆ setStartTime()
def time_period.TimePeriod.setStartTime |
( |
|
self, |
|
|
time |
startTime |
|
) |
| |
Set period start time.
- Parameters
-
startTime | Starting time of day |
◆ timePlus()
time time_period.TimePeriod.timePlus |
( |
|
self, |
|
|
time |
dayTime, |
|
|
timedelta |
duration |
|
) |
| |
add duration to a time of day
- Parameters
-
dayTime | time of day |
duration | duration to add |
- Returns
- new time
The documentation for this class was generated from the following file: