Class NonWorkingPeriod represents named non-working, non-recurring periods.
More...
|
| | __init__ (self, str name, str description, datetime startDateTime, timedelta duration) |
| | Construct a non-working period.
|
| |
| | setStartDateTime (self, datetime startDateTime) |
| | Set period start date and time.
|
| |
| datetime | getEndDateTime (self) |
| | Get period end date and time.
|
| |
| | setDuration (self, timedelta duration) |
| | Set duration.
|
| |
|
str | __str__ (self) |
| |
| int | compareTo (self, other) |
| | Compare two non-working periods.
|
| |
| bool | isInPeriod (self, date day) |
| | Check to see if this day is contained in the non-working period.
|
| |
Class NonWorkingPeriod represents named non-working, non-recurring periods.
For example holidays and scheduled outages such as for preventive maintenance.
◆ __init__()
| 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()
| non_working_period.NonWorkingPeriod.setDuration |
( |
| self, |
|
|
timedelta | duration ) |
◆ setStartDateTime()
| 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: