示例#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)
示例#2
0
文件: models.py 项目: hjhwusword/FiC
 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)
示例#3
0
 def getWeekday(self):
     return EnumWeekday.fromInt(self.dayIndex)
示例#4
0
文件: models.py 项目: hjhwusword/FiC
 def getWeekday(self):
     return EnumWeekday.fromInt(self.dayIndex)
示例#5
0
def getTime(dayNum, hour, min):
    return Time.getInstance(EnumWeekday.fromInt(dayNum), hour, min)
示例#6
0
def getTime(dayNum, hour, min):
    return Time.getInstance(EnumWeekday.fromInt(dayNum), hour, min)