Get a ISO date string, i.e. 'YYYY-MM-DD', from a Date
npm install iso-date[![Build status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![js-xo-style][codestyle-image]][codestyle-url]
> Get a ISO date string, i.e. 'YYYY-MM-DD', from a Date
Install iso-date using npm:
``bash`
npm install --save iso-date
`javascript
var isoDate = require('iso-date');
isoDate('2011-11-11 11:11:11');
// "2011-11-11"
isoDate(1444047247887);
// "2015-10-05"
isoDate();
// todays date, e.g: "2015-10-05"
isoDate(new Date());
// todays date, e.g: "2015-10-05"
`
| Name | Type | Description |
|------|------|-------------|
| date | String|Number|Date|undefined | The date to get an ISO date from |
Returns: String`, a date string on the format "YYYY-MM-DD".
MIT © Joakim Carlstein
[npm-url]: https://npmjs.org/package/iso-date
[npm-image]: https://badge.fury.io/js/iso-date.svg
[travis-url]: https://travis-ci.org/joakimbeng/iso-date
[travis-image]: https://travis-ci.org/joakimbeng/iso-date.svg?branch=master
[codestyle-url]: https://github.com/sindresorhus/xo
[codestyle-image]: https://img.shields.io/badge/code%20style-xo-brightgreen.svg?style=flat