all repos — hastyscribe @ 5ea17993dbd82b1d9cd3cc32e7823816c1de0bba

A professional markdown compiler.

Fixed document date parsing.
* Closes #57.
h3rald h3rald@h3rald.com
Sat, 21 Apr 2018 13:11:51 +0200
commit

5ea17993dbd82b1d9cd3cc32e7823816c1de0bba

parent

4c0e07998d8d8140c121db822abe3878c137f0d0

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M hastyscribe.nimhastyscribe.nim

@@ -380,6 +380,7 @@

# Date parsing and validation var timeinfo: DateTime = local(getTime()) + if parse_date(metadata.date, timeinfo) == false: discard parse_date(getDateStr(), timeinfo)
M lib/utils.nimlib/utils.nim

@@ -19,7 +19,7 @@ )

if parts.len < 3: return false try: - timeinfo = DateTime(year: parts[0], month: Month(parts[1]-1), monthday: parts[2]) + timeinfo = DateTime(year: parts[0], month: Month(parts[1]), monthday: parts[2]) # Fix invalid dates (e.g. Feb 31st -> Mar 3rd) timeinfo = local(timeinfo.toTime); return true