diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-05-07 20:22:26 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-05-07 20:22:26 +0200 |
commit | 9ef09fc6f505a2dc1cc6fb8b7869ae25de6a2be0 (patch) | |
tree | 11a24854c88a70420ba3048dedf2df165b5dcbbc | |
parent | ec0e60830a2acbbe701b6b206bc93d56baea3fd4 (diff) | |
parent | 60862c22f5faeabe6b3dd21fcdd7ce7e4d45b6e1 (diff) | |
download | Nim-9ef09fc6f505a2dc1cc6fb8b7869ae25de6a2be0.tar.gz |
Merge pull request #2622 from def-/times-year
Year shouldn't be arbitrarily limited to -10_000 .. 10_000
-rw-r--r-- | lib/pure/times.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 5f8835c6a..1b9fa4599 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -119,7 +119,7 @@ type ## in the range 0 to 23. monthday*: range[1..31] ## The day of the month, in the range 1 to 31. month*: Month ## The current month. - year*: range[-10_000..10_000] ## The current year. + year*: int ## The current year. weekday*: WeekDay ## The current day of the week. yearday*: range[0..365] ## The number of days since January 1, ## in the range 0 to 365. @@ -379,7 +379,7 @@ when not defined(JS): result.hour = t.hour result.monthday = t.monthday result.month = ord(t.month) - result.year = t.year - 1900 + result.year = cint(t.year - 1900) result.weekday = weekDays[t.weekday] result.yearday = t.yearday result.isdst = if t.isDST: 1 else: 0 |