summaryrefslogtreecommitdiff
path: root/Demo/scripts/unbirthday.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-09-13 01:43:28 +0000
committerAndrew M. Kuchling <amk@amk.ca>2008-09-13 01:43:28 +0000
commit2a9b9cbea08c7c22a328926b0e0719fb197743a0 (patch)
tree51c8930c097a35c97db9cdae6f5af889424cf9bd /Demo/scripts/unbirthday.py
parente91fcbdf691c687d1195fad342564e0b3442f444 (diff)
downloadcpython-git-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.gz
#687648 from Robert Schuppenies: use classic division.
Diffstat (limited to 'Demo/scripts/unbirthday.py')
-rwxr-xr-xDemo/scripts/unbirthday.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/scripts/unbirthday.py b/Demo/scripts/unbirthday.py
index 2d0b8e5f40..8ed9084896 100755
--- a/Demo/scripts/unbirthday.py
+++ b/Demo/scripts/unbirthday.py
@@ -92,9 +92,9 @@ def mkdate((year, month, day)):
# even though that day never actually existed and the calendar
# was different then...
days = year*365 # years, roughly
- days = days + (year+3)/4 # plus leap years, roughly
- days = days - (year+99)/100 # minus non-leap years every century
- days = days + (year+399)/400 # plus leap years every 4 centirues
+ days = days + (year+3)//4 # plus leap years, roughly
+ days = days - (year+99)//100 # minus non-leap years every century
+ days = days + (year+399)//400 # plus leap years every 4 centirues
for i in range(1, month):
if i == 2 and calendar.isleap(year):
days = days + 29