Esempio n. 1
0
    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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 def getWeekday(self):
     return EnumWeekday.fromInt(self.dayIndex)
Esempio n. 4
0
 def getWeekday(self):
     return EnumWeekday.fromInt(self.dayIndex)
Esempio n. 5
0
def getTime(dayNum, hour, min):
    return Time.getInstance(EnumWeekday.fromInt(dayNum), hour, min)
Esempio n. 6
0
def getTime(dayNum, hour, min):
    return Time.getInstance(EnumWeekday.fromInt(dayNum), hour, min)