JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 289
  • Score
    100M100P100Q87428F
  • License MIT

get short date

Package Exports

  • shortdate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shortdate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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