<s> import math <EOL> class TimeSlot : <EOL> def __init__ ( self , dayOfWeek , startMinutes , endMinutes ) : <EOL> self . DAYS = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . dayOfWeek = dayOfWeek <EOL> self . startMinutes = startMinutes <EOL> self . endMinutes = endMinutes <EOL> def compareTo ( self , other ) : <EOL> if self . dayOfWeek < other . dayOfWeek : <EOL> return - <NUM_LIT:1> <EOL> elif self . dayOfWeek > other . dayOfWeek : <EOL> return <NUM_LIT:1> <EOL> else : <EOL> if self . startMinutes < other . startMinutes : <EOL> return - <NUM_LIT:1> <EOL> elif self . startMinutes > other . startMinutes : <EOL> return <NUM_LIT:1> <EOL> return <NUM_LIT:0> <EOL> def getDayOfWeek ( self ) : <EOL> return self . dayOfWeek <EOL> def getDescription ( self ) : <EOL> return self . DAYS [ self . dayOfWeek ] + "<STR_LIT:U+0020>" + self . getHrsMins ( self . startMinutes ) + "<STR_LIT:->" + self . getHrsMins ( self . endMinutes ) <EOL> def getHrsMins ( self , mins ) : <EOL> hrs = math . floor ( mins / <NUM_LIT> ) <EOL> if hrs > <NUM_LIT:12> : <EOL> hrs -= <NUM_LIT:12> <EOL> remainder = math . floor ( mins % <NUM_LIT> ) <EOL> if remainder < <NUM_LIT:10> : <EOL> string_mins = "<STR_LIT:0>" + str ( remainder ) <EOL> else : <EOL> string_mins = str ( remainder ) <EOL> return str ( hrs ) + "<STR_LIT::>" + string_mins </s>
