0.1.1 • Published 2 years ago

simple-date-lib v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

simple-string-lib

npm npm

Install

npm install --save simple-string-lib

or

yarn add simple-string-lib

Usage

import { D } from 'simple-date-lib';

const date = new D('2019-01-01 00:00:00');

d.format('Y-M-d'); // 2019-January-1
d.year(); // 2019
d.yr(); // 19
d.month(); // January
d.mon() // Jan
d.day(); // Tuesday
d.dy() // Tue
d.date(); // 1
d.when('September 6, 2022') // 1 month ago