comparison roundup/date.py @ 5380:64c4e43fbb84

Python 3 preparation: numeric literal syntax. Fixes octal constants to use leading 0o, and removes 'L' suffixes. Tool-assisted patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 21:43:32 +0000
parents 35ea9b1efc14
children c26d88ec071e
comparison
equal deleted inserted replaced
5379:17edccfe1755 5380:64c4e43fbb84
1010 '''Calculate the Interval as a number of seconds. 1010 '''Calculate the Interval as a number of seconds.
1011 1011
1012 Months are counted as 30 days, years as 365 days. Returns a Long 1012 Months are counted as 30 days, years as 365 days. Returns a Long
1013 int. 1013 int.
1014 ''' 1014 '''
1015 n = self.year * 365L 1015 n = self.year * 365
1016 n = n + self.month * 30 1016 n = n + self.month * 30
1017 n = n + self.day 1017 n = n + self.day
1018 n = n * 24 1018 n = n * 24
1019 n = n + self.hour 1019 n = n + self.hour
1020 n = n * 60 1020 n = n * 60

Roundup Issue Tracker: http://roundup-tracker.org/