Skip to content

Commit 6722045

Browse files
committed
correct date range
1 parent dfb2d93 commit 6722045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wfdb/records.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ def parsedatestring(datestring):
10751075
raise ValueError('year must be positive')
10761076
if month<1 or month>12:
10771077
raise ValueError('month must be between 1 and 12')
1078-
if day not in range(monthrange(year, month)[0], monthrange(year, month)[1]):
1078+
if day not in range(1, monthrange(year, month)[1]+1):
10791079
raise ValueError('day does not exist for specified year and month')
10801080

10811081
return (day, month, year)

0 commit comments

Comments
 (0)