Class Team is a named group of individuals who rotate through a shift schedule.
More...
Class Team is a named group of individuals who rotate through a shift schedule.
◆ __init__()
def team.Team.__init__ |
( |
|
self, |
|
|
str |
name, |
|
|
str |
description, |
|
|
Rotation |
rotation, |
|
|
date |
rotationStart |
|
) |
| |
Construct a team.
- Parameters
-
name | Name of team |
description | Description of team |
rotation | Rotation of this team |
rotationStart | Date that the rotation starts for this team |
◆ calculateWorkingTime()
timedelta team.Team.calculateWorkingTime |
( |
|
self, |
|
|
datetime |
fromTime, |
|
|
datetime |
toTime |
|
) |
| |
Calculate the team working time between the specified dates and times of day.
- Parameters
-
fromTime | Starting date and time of day |
toTime | Ending date and time of day |
- Returns
- Duration of working time as timedelta
◆ getAverageHoursWorkedPerWeek()
float team.Team.getAverageHoursWorkedPerWeek |
( |
|
self | ) |
|
Get the average number of hours worked each week by this team.
- Returns
- average hours worked per week
◆ getDayInRotation()
int team.Team.getDayInRotation |
( |
|
self, |
|
|
date |
day |
|
) |
| |
Get the day number in the rotation for this date.
- Parameters
-
- Returns
- day number in the rotation, starting at 1
◆ getPercentageWorked()
float team.Team.getPercentageWorked |
( |
|
self | ) |
|
Get the shift rotation's working time as a percentage of the rotation duration.
- Returns
- Percentage worked
◆ getRotationDuration()
timedelta team.Team.getRotationDuration |
( |
|
self | ) |
|
Get the duration of the shift rotation.
- Returns
- Duration as timedelta
◆ getShiftInstanceForDay()
ShiftInstance team.Team.getShiftInstanceForDay |
( |
|
self, |
|
|
date |
day |
|
) |
| |
◆ isDayOff()
bool team.Team.isDayOff |
( |
|
self, |
|
|
date |
day |
|
) |
| |
Check to see if this day is a day off.
- Parameters
-
- Returns
- True if a day off
The documentation for this class was generated from the following file: