Class NonWorkingPeriod represents named non-working, non-recurring periods.
More...
|
def | __init__ (self, str name, str description, datetime startDateTime, timedelta duration) |
| Construct a non-working period. More...
|
|
def | setStartDateTime (self, datetime startDateTime) |
| Set period start date and time. More...
|
|
datetime | getEndDateTime (self) |
| Get period end date and time. More...
|
|
def | setDuration (self, timedelta duration) |
| Set duration. More...
|
|
str | __str__ (self) |
|
int | compareTo (self, other) |
| Compare two non-working periods. More...
|
|
bool | isInPeriod (self, date day) |
| Check to see if this day is contained in the non-working period. More...
|
|
Class NonWorkingPeriod represents named non-working, non-recurring periods.
For example holidays and scheduled outages such as for preventive maintenance.
◆ __init__()
def non_working_period.NonWorkingPeriod.__init__ |
( |
|
self, |
|
|
str |
name, |
|
|
str |
description, |
|
|
datetime |
startDateTime, |
|
|
timedelta |
duration |
|
) |
| |
Construct a non-working period.
- Parameters
-
name | Name of period |
description | Description of period |
startDateTime | Starting date and time of day of period |
duration | Duration of period |
◆ compareTo()
int non_working_period.NonWorkingPeriod.compareTo |
( |
|
self, |
|
|
|
other |
|
) |
| |
Compare two non-working periods.
- Parameters
-
- Returns
- -1 if starts before other, 0 is same starting times, else 1
◆ getEndDateTime()
datetime non_working_period.NonWorkingPeriod.getEndDateTime |
( |
|
self | ) |
|
Get period end date and time.
- Returns
- Period end
◆ isInPeriod()
bool non_working_period.NonWorkingPeriod.isInPeriod |
( |
|
self, |
|
|
date |
day |
|
) |
| |
Check to see if this day is contained in the non-working period.
- Parameters
-
- Returns
- True if in the non-working period
- Exceptions
-
◆ setDuration()
def non_working_period.NonWorkingPeriod.setDuration |
( |
|
self, |
|
|
timedelta |
duration |
|
) |
| |
◆ setStartDateTime()
def non_working_period.NonWorkingPeriod.setStartDateTime |
( |
|
self, |
|
|
datetime |
startDateTime |
|
) |
| |
Set period start date and time.
- Parameters
-
startDateTime | Period start |
The documentation for this class was generated from the following file: