Skip to content
Date parsing for a past or future data with a simple short letter format
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json
parse.js
yarn.lock

README.md

ydmo

Travis (.com)

Date parsing for a past or future data with a simple short letter format

Install

$ yarn add ydmo
$ npm install ydmo

Usage (ES6 imports)

import ydmo from 'ydmo';

// returns date 1 year and 3 days in the future
const futureDate = ydmo('+1y3d');

// returns date 1 year and 3 days in the past
const pastData = ydmo('-6mo4h');

Date codes

Year: y

Month: mo or m

Day: d

Hour: h

Minute: mi

Second: s

License

MIT © Benjamin Hollway

You can’t perform that action at this time.