diff options
author | GULPF <oscarnihlgard@gmail.com> | 2018-01-03 23:54:36 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-01-03 23:54:36 +0100 |
commit | 30d182e5d6a8a64f637b486e507e7e5e4a1662d9 (patch) | |
tree | 5c52b981d5a448515c69cf2b434735de3de4c2d6 /lib | |
parent | 8bcaadc9e4c10aad17339f9cea69418dd5d2bdf8 (diff) | |
download | Nim-30d182e5d6a8a64f637b486e507e7e5e4a1662d9.tar.gz |
Unexport epochday procs (#7024)
Diffstat (limited to 'lib')
-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 7df1d0178..42e89e7ce 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -176,7 +176,7 @@ proc assertValidDate(monthday: MonthdayRange, month: Month, year: int) {.inline. assert monthday <= getDaysInMonth(month, year), $year & "-" & $ord(month) & "-" & $monthday & " is not a valid date" -proc toEpochDay*(monthday: MonthdayRange, month: Month, year: int): int64 = +proc toEpochDay(monthday: MonthdayRange, month: Month, year: int): int64 = ## Get the epoch day from a year/month/day date. ## The epoch day is the number of days since 1970/01/01 (it might be negative). assertValidDate monthday, month, year @@ -191,7 +191,7 @@ proc toEpochDay*(monthday: MonthdayRange, month: Month, year: int): int64 = let doe = yoe * 365 + yoe div 4 - yoe div 100 + doy return era * 146097 + doe - 719468 -proc fromEpochDay*(epochday: int64): tuple[monthday: MonthdayRange, month: Month, year: int] = +proc fromEpochDay(epochday: int64): tuple[monthday: MonthdayRange, month: Month, year: int] = ## Get the year/month/day date from a epoch day. ## The epoch day is the number of days since 1970/01/01 (it might be negative). # Based on http://howardhinnant.github.io/date_algorithms.html |