예제 #1
0
    def daysSince1970(self):
        # Add days between 1970 and current year (ignoring leap days)
        result = (self.mYear - 1970) * 365

        # Add leap days between years
        result += utils.leapDaysSince1970(self.mYear - 1970)

        # Add days in current year up to current month (includes leap day for
        # current year as needed)
        result += utils.daysUptoMonth(self.mMonth, self.mYear)

        # Add days in month
        result += self.mDay - 1

        return result
예제 #2
0
    def daysSince1970(self):
        # Add days between 1970 and current year (ignoring leap days)
        result = (self.mYear - 1970) * 365

        # Add leap days between years
        result += utils.leapDaysSince1970(self.mYear - 1970)

        # Add days in current year up to current month (includes leap day for
        # current year as needed)
        result += utils.daysUptoMonth(self.mMonth, self.mYear)

        # Add days in month
        result += self.mDay - 1

        return result
예제 #3
0
 def getYearDay(self):
     return self.mDay + utils.daysUptoMonth(self.mMonth, self.mYear)
예제 #4
0
 def getYearDay(self):
     return self.mDay + utils.daysUptoMonth(self.mMonth, self.mYear)