PyShift Work Schedule
Work Schedule for Python
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
shift_instance.ShiftInstance Class Reference

Class ShiftInstance is an instance of a Shift. More...

Public Member Functions

 __init__ (self, Shift shift, datetime startDateTime, 'Team' team)
 Construct an instance of a shift.
 
datetime getEndTime (self)
 Get the ending date and time of day.
 
int compareTo (self, other)
 Compare this shift to another such period by start date and time of day.
 
bool isInShiftInstance (self, datetime dateTime)
 Determine if this time falls within the shift instance period.
 
str __str__ (self)
 

Public Attributes

 shift
 
 startDateTime
 
 team
 

Detailed Description

Class ShiftInstance is an instance of a Shift.

A shift instance is worked by a Team.

Constructor & Destructor Documentation

◆ __init__()

shift_instance.ShiftInstance.__init__ ( self,
Shift shift,
datetime startDateTime,
'Team' team )

Construct an instance of a shift.

Parameters
shiftShift definition
startDateTimeStarting date and time of day
team{link Team} working the shift instance

Member Function Documentation

◆ compareTo()

int shift_instance.ShiftInstance.compareTo ( self,
other )

Compare this shift to another such period by start date and time of day.

Parameters
otherOther shift instance
Returns
-1 if less than, 0 if equal and 1 if greater than

◆ getEndTime()

datetime shift_instance.ShiftInstance.getEndTime ( self)

Get the ending date and time of day.

Returns
datetime when shift ends

◆ isInShiftInstance()

bool shift_instance.ShiftInstance.isInShiftInstance ( self,
datetime dateTime )

Determine if this time falls within the shift instance period.

Parameters
dateTimeDate 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: