datetime_parse
a datetime parser write in Nim
parse datetime from various media resources
this lib using pattern match design to parse datetime from various media resources
supported format see corpus.txt
this repo also demonstrate how to write a nim module and export it as nodejs module.
Installation
for nim
nimble install datetime_parse
for js
npm install datetime_parse
or
yarn add datetime_parse
Usage
for js
const parse =const assert = ;const s ="Monday, November 25, 2019 11:22 am"let r =assert
for nim
import datetime_parseconst s ="Monday, November 25, 2019 11:22 am"let r = parse(s)assert r.year == 2019
Development
build
nimble buildjs
Deployment
dist
nimble distjs
Contribution
add a datetime format welcome.
test
nimble tests