Class TimePeriod is a named period of time with a specified duration and starting time of day.
More...
|
| | __init__ (self, str name, str description, time startTime, timedelta duration) |
| | Construct a time period.
|
| |
| | setDuration (self, timedelta duration) |
| | Set duration.
|
| |
| time | timePlus (self, time dayTime, timedelta duration) |
| | add duration to a time of day
|
| |
| time | getEndTime (self) |
| | Get period end.
|
| |
| | setStartTime (self, time startTime) |
| | Set period start time.
|
| |
|
str | __str__ (self) |
| |
|
|
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__()
| time_period.TimePeriod.__init__ |
( |
| self, |
|
|
str | name, |
|
|
str | description, |
|
|
time | 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()
| time_period.TimePeriod.setDuration |
( |
| self, |
|
|
timedelta | duration ) |
Set duration.
- Parameters
-
| duration | period duration as timedelta |
◆ setStartTime()
| 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: