def shift(self, amount): totMin = self.__getNormalizeTime__() + amount remainderAfterDay = totMin % 1440 remainderAfterHour = remainderAfterDay % 60 todayIndex = self.dayIndex if (totMin / 1440 > 0): todayIndex = (((self.dayIndex - 1) + totMin / 1440) % 7) + 1 theHour = remainderAfterDay / 60 theMini = remainderAfterHour return self.getInstance(EnumWeekday.fromInt(todayIndex), theHour, theMini)
def shift(self, amount): totMin = self.__getNormalizeTime__() + amount remainderAfterDay = totMin % 1440 remainderAfterHour = remainderAfterDay % 60 todayIndex = self.dayIndex if(totMin/1440 > 0) : todayIndex = (((self.dayIndex - 1) + totMin/1440) % 7) + 1 theHour = remainderAfterDay / 60 theMini = remainderAfterHour return self.getInstance(EnumWeekday.fromInt(todayIndex), theHour, theMini)
def getWeekday(self): return EnumWeekday.fromInt(self.dayIndex)
def getTime(dayNum, hour, min): return Time.getInstance(EnumWeekday.fromInt(dayNum), hour, min)