shortdate

2.0.0 • Public • Published

Shortdate License NPM version Dependency Status Build Status Coverage Status

Get short date. For browser and node.

Install

npm i shortdate

How to use?

shortdate uses arguments:

  • date (optional)
  • options (optional):
    • sep - separator
    • order - "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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    917
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    917
  • 1.2.0
    120
  • 1.1.0
    2
  • 1.0.1
    3
  • 1.0.0
    2

Package Sidebar

Install

npm i shortdate

Weekly Downloads

205

Version

2.0.0

License

MIT

Unpacked Size

7.69 kB

Total Files

6

Last publish

Collaborators

  • coderaiser