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