コード例 #1
0
ファイル: datetime.py プロジェクト: gingerkaan/serveros
    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
ファイル: datetime.py プロジェクト: eventable/PyCalendar
    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
ファイル: datetime.py プロジェクト: gingerkaan/serveros
 def getYearDay(self):
     return self.mDay + utils.daysUptoMonth(self.mMonth, self.mYear)
コード例 #4
0
ファイル: datetime.py プロジェクト: eventable/PyCalendar
 def getYearDay(self):
     return self.mDay + utils.daysUptoMonth(self.mMonth, self.mYear)