Class Rotation maintains a sequenced list of shift and off-shift time periods.
More...
|
| | __init__ (self, str name, str description) |
| | Construct a shift rotation.
|
| |
| List[Union[Shift, DayOff]] | getPeriods (self) |
| | Get the shifts and off-shifts in the rotation.
|
| |
| int | getDayCount (self) |
| | Get the number of days in the rotation.
|
| |
| timedelta | getDuration (self) |
| | Get the duration of this rotation.
|
| |
| timedelta | getWorkingTime (self) |
| | Get the shift rotation's total working time.
|
| |
| RotationSegment | addSegment (self, Shift startingShift, int daysOn, int daysOff) |
| | Add a working period to this rotation.
|
| |
|
str | __str__ (self) |
| |
|
| DayOff | getDayOff () |
| | Create or return the day off period.
|
| |
Class Rotation maintains a sequenced list of shift and off-shift time periods.
◆ __init__()
| rotation.Rotation.__init__ |
( |
| self, |
|
|
str | name, |
|
|
str | description ) |
Construct a shift rotation.
- Parameters
-
| name | Name of rotation |
| description | Description of rotation
|
◆ addSegment()
| RotationSegment rotation.Rotation.addSegment |
( |
| self, |
|
|
Shift | startingShift, |
|
|
int | daysOn, |
|
|
int | daysOff ) |
Add a working period to this rotation.
A working period starts with a shift and specifies the number of days on and days off
- Parameters
-
| startingShift | Shift that starts the period |
| daysOn | Number of days on shift |
| daysOff | Number of days off shift |
- Returns
RotationSegment
◆ getDayCount()
| int rotation.Rotation.getDayCount |
( |
| self | ) |
|
Get the number of days in the rotation.
- Returns
- Day count
◆ getDayOff()
| DayOff rotation.Rotation.getDayOff |
( |
| ) |
|
|
static |
Create or return the day off period.
- Returns
- the day off period
◆ getDuration()
| timedelta rotation.Rotation.getDuration |
( |
| self | ) |
|
Get the duration of this rotation.
- Returns
- timedelta duration
◆ getPeriods()
| List[Union[Shift, DayOff]] rotation.Rotation.getPeriods |
( |
| self | ) |
|
Get the shifts and off-shifts in the rotation.
- Returns
- List of periods
◆ getWorkingTime()
| timedelta rotation.Rotation.getWorkingTime |
( |
| self | ) |
|
Get the shift rotation's total working time.
- Returns
- timedelta of working time
The documentation for this class was generated from the following file: