Skip to content

Commit daa8afb

Browse files
authored
Merge pull request #3 from kgashok/patch-1
Update recipe-115421.py
2 parents 0630f5a + 546a940 commit daa8afb

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

recipes/Python/115421_Date_difference/recipe-115421.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,7 @@
1414
JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC = range(len(months))
1515

1616
def leapyear(year):
17-
if year % 4 == 0:
18-
if year % 100 == 0:
19-
if year % 400 == 0:
20-
return TRUE
21-
else:
22-
return FALSE
23-
else:
24-
return TRUE
25-
else:
26-
return FALSE
17+
return year % 4 == 0 and year % 100 != 0 or year % 400 == 0
2718

2819
def main():
2920
days=sum=0

0 commit comments

Comments
 (0)