datetime_parse

1.0.2 • Public • Published

datetime_parse Npm Version npm: total downloads

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}  = require("datetime_parse")
const assert = require('assert');
const s ="Monday, November 25, 2019 11:22 am"
let r = parse(s)
assert.equal(r.getFullYear(),2019)

for nim

import datetime_parse
const 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

Readme

Keywords

Package Sidebar

Install

npm i datetime_parse

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

2.52 MB

Total Files

4

Last publish

Collaborators

  • bung87