Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

You can’t perform that action at this time.