Fixed incorrect month index (#186).
h3rald h3rald@h3rald.com
Sun, 30 Jul 2023 04:40:54 +0000
2 files changed,
4 insertions(+),
4 deletions(-)
M
minpkg/lib/min_time.nim
→
minpkg/lib/min_time.nim
@@ -27,7 +27,7 @@ let tinfo = time.local
var info = newDict(i.scope) info.objType = "timeinfo" i.dset info, "year", tinfo.year.newVal - i.dset info, "month", (tinfo.month.int+1).newVal + i.dset info, "month", (tinfo.month.int).newVal i.dset info, "day", tinfo.monthday.newVal i.dset info, "weekday", (tinfo.weekday.int+1).newVal i.dset info, "yearday", tinfo.yearday.newVal@@ -43,7 +43,7 @@ let vals = i.expect("dict:timeinfo")
let dict = vals[0] try: let year = i.dget(dict, "year").intVal.int - let month = Month(i.dget(dict, "month").intVal.int - 1) + let month = Month(i.dget(dict, "month").intVal.int) let monthday = MonthdayRange(i.dget(dict, "day").intVal.int) let hour: HourRange = i.dget(dict, "hour").intVal.int let minute: MinuteRange = i.dget(dict, "minute").intVal.int@@ -75,4 +75,4 @@ else:
time = t.floatVal.int64.fromUnix i.push time.local.format(s.getString).newVal - def.finalize("time")+ def.finalize("time")
M
next-release.md
→
next-release.md
@@ -1,6 +1,6 @@
### New Features -* Significantly improved the min shell prompt by leveraging the nim-noise library +* Fixed month index in `timeinfo` and `to-timestamp` symbols (each month number was increased by 1). Fixes #186. ### Fixes and Improvements