yesterdayone

1.0.3 • Public • Published

yesterdayone

Get the yesterday from the date (JavaScript's Date object standard).


Install & run

Install:

npm i yesterdayone

Run:

const yesterday = require('yesterdayone')
 
yesterday(new Date(), 'dd-mm-yyyy') // '03-05-2018'
yesterday('2018-05-04T18:31:17.594Z', 'yyyy-mm-dd') // '2018-05-03'
yesterday('2018-05-04T22:20:20', 'dd/mm/yyyy') // '03/05/2018'
yesterday('Tue 01-01-2009 6:00', 'dd/mm/yyyy') // '31/12/2008'

License

The MIT License (MIT)

Copyright (c) 2018 marcker

Package Sidebar

Install

npm i yesterdayone

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

7.33 kB

Total Files

10

Last publish

Collaborators

  • marcker