Class ShiftInstance is an instance of a Shift.
More...
|
def | __init__ (self, Shift shift, datetime startDateTime, team) |
| Construct an instance of a shift. More...
|
|
datetime | getEndTime (self) |
| Get the ending date and time of day. More...
|
|
int | compareTo (self, other) |
| Compare this shift to another such period by start date and time of day. More...
|
|
bool | isInShiftInstance (self, datetime dateTime) |
| Determine if this time falls within the shift instance period. More...
|
|
str | __str__ (self) |
|
Class ShiftInstance is an instance of a Shift.
A shift instance is worked by a Team.
◆ __init__()
def shift.ShiftInstance.__init__ |
( |
|
self, |
|
|
Shift |
shift, |
|
|
datetime |
startDateTime, |
|
|
|
team |
|
) |
| |
Construct an instance of a shift.
- Parameters
-
shift | Shift definition |
startDateTime | Starting date and time of day |
team | {link Team} working the shift instance |
◆ compareTo()
int shift.ShiftInstance.compareTo |
( |
|
self, |
|
|
|
other |
|
) |
| |
Compare this shift to another such period by start date and time of day.
- Parameters
-
other | Other shift instance |
- Returns
- -1 if less than, 0 if equal and 1 if greater than
◆ getEndTime()
datetime shift.ShiftInstance.getEndTime |
( |
|
self | ) |
|
Get the ending date and time of day.
- Returns
- datetime when shift ends
◆ isInShiftInstance()
bool shift.ShiftInstance.isInShiftInstance |
( |
|
self, |
|
|
datetime |
dateTime |
|
) |
| |
Determine if this time falls within the shift instance period.
- Parameters
-
dateTime | Date and time to check |
- Returns
- True if the specified time is in this shift instance
The documentation for this class was generated from the following file: