Skip to content

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

License

Notifications You must be signed in to change notification settings

nothingrandom/ydmo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Week: w

Day: d

Hour: h

Minute: mi

Second: s

License

MIT © Benjamin Grant

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published