|
PyShift Work Schedule
Work Schedule for Python
|
Class Team is a named group of individuals who rotate through a shift schedule. More...
Public Member Functions | |
| __init__ (self, str name, str description, Rotation rotation, date rotationStart) | |
| Construct a team. | |
| timedelta | getRotationDuration (self) |
| Get the duration of the shift rotation. | |
| float | getPercentageWorked (self) |
| Get the shift rotation's working time as a percentage of the rotation duration. | |
| float | getAverageHoursWorkedPerWeek (self) |
| Get the average number of hours worked each week by this team. | |
| int | getDayInRotation (self, date day) |
| Get the day number in the rotation for this date. | |
| ShiftInstance | getShiftInstanceForDay (self, date day) |
Get the ShiftInstance for the specified day. | |
| bool | isDayOff (self, date day) |
| Check to see if this day is a day off. | |
| timedelta | calculateWorkingTime (self, datetime fromTime, datetime toTimeOfDay) |
| Calculate the team working time between the specified dates and times of day. | |
| str | __str__ (self) |
| addMember (self, TeamMember member) | |
| Add a member to this team. | |
| removeMember (self, TeamMember member) | |
| Remove a member from this team. | |
| bool | hasMember (self, TeamMember member) |
| True if member is assigned to this team. | |
| addMemberException (self, TeamMemberException memberException) | |
| Add a member exception to this team. | |
| removeMemberException (self, TeamMemberException memberException) | |
| Remove a member exception from this team. | |
| buildMemberCache (self) | |
| List[TeamMember] | getMembers (self, datetime shiftStart) |
| Build a list of team members for the specified shift start. | |
Public Attributes | |
| rotation | |
| rotationStart | |
| assignedMembers | |
| memberExceptions | |
| exceptionCache | |
Class Team is a named group of individuals who rotate through a shift schedule.
| team.Team.__init__ | ( | self, | |
| str | name, | ||
| str | description, | ||
| Rotation | rotation, | ||
| date | rotationStart ) |
Construct a team.
| name | Name of team |
| description | Description of team |
| rotation | Rotation of this team |
| rotationStart | Date that the rotation starts for this team |
| team.Team.addMember | ( | self, | |
| TeamMember | member ) |
Add a member to this team.
| member | TeamMember to add |
| team.Team.addMemberException | ( | self, | |
| TeamMemberException | memberException ) |
Add a member exception to this team.
| memberException | TeamMemberException to add |
| timedelta team.Team.calculateWorkingTime | ( | self, | |
| datetime | fromTime, | ||
| datetime | toTimeOfDay ) |
Calculate the team working time between the specified dates and times of day.
| fromTime | Starting date and time of day |
| toTime | Ending date and time of day |
| float team.Team.getAverageHoursWorkedPerWeek | ( | self | ) |
Get the average number of hours worked each week by this team.
| int team.Team.getDayInRotation | ( | self, | |
| date | day ) |
Get the day number in the rotation for this date.
| day | date |
| List[TeamMember] team.Team.getMembers | ( | self, | |
| datetime | shiftStart ) |
Build a list of team members for the specified shift start.
| shiftStart | Shift instance starting date and time |
| float team.Team.getPercentageWorked | ( | self | ) |
Get the shift rotation's working time as a percentage of the rotation duration.
| timedelta team.Team.getRotationDuration | ( | self | ) |
Get the duration of the shift rotation.
| ShiftInstance team.Team.getShiftInstanceForDay | ( | self, | |
| date | day ) |
Get the ShiftInstance for the specified day.
| day | date with a shift instance |
ShiftInstance | bool team.Team.isDayOff | ( | self, | |
| date | day ) |
Check to see if this day is a day off.
| day | date to check |
| team.Team.removeMember | ( | self, | |
| TeamMember | member ) |
Remove a member from this team.
| member | TeamMember to remove |
| team.Team.removeMemberException | ( | self, | |
| TeamMemberException | memberException ) |
Remove a member exception from this team.
| memberException | TeamMemberException to remove |