2.0.0 • Published 4 years ago
shortdate v2.0.0
Shortdate
Get short date. For browser and node.
Install
npm i shortdate
How to use?
shortdate
uses arguments:
date
(optional)options
(optional):sep
- separatororder
- "big", "middle", "little" (endian types);
var shortdate = require('shortdate');
shortdate();
// returns
'2015.01.08'
shortdate(new Date('9-9'));
// returns
'2001.09.09'
shortdate(new Date(), {
sep: '/'
});
// returns
'2016/02/20'
shortdate(new Date(), {
order: 'little'
});
// returns
'20.02.2016'
License
MIT