iso-date

1.0.0 • Public • Published

iso-date

Build status NPM version js-xo-style

Get a ISO date string, i.e. 'YYYY-MM-DD', from a Date

Installation

Install iso-date using npm:

npm install --save iso-date

Usage

Module usage

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"

API

isoDate(date)

Name Type Description
date `String Number

Returns: String, a date string on the format "YYYY-MM-DD".

License

MIT © Joakim Carlstein

/iso-date/

    Package Sidebar

    Install

    npm i iso-date

    Weekly Downloads

    17

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • joakimbeng