1.0.0 • Published 7 years ago

just-iso-date v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

just-iso-date

Note: this package is a modified version of just-date by ismyrnow

Simple static functions used to convert between ISO strings and JS date objects. Conversions disregard timestamp, so we are dealing with just the dates.

Installation

npm i just-iso-date -S

Usage

const isoDate = require('just-iso-date')

// creates date object with local timezone
var date = isoDate.toDate('1988-02-13')

// creates string in format YYYY-MM-DD
var string = isoDate.toString(date)