create-date

1.0.0 • Public • Published

create-date Build Status

Create a date without using the 'new' keyword

Because this doesn't work:

Date('1-1-2000')

Install

$ npm install --save create-date

Usage

var createDate = require('create-date')
 
createDate('1-1-2000')
//=> Sat Jan 01 2000 00:00:00 GMT-0800 (PST) (Date)

API

createDate(value) -> date

value

Required
Type: string / number

A date string, number, or any other appropriate value to pass to the Date constructor.

License

MIT © Ben Drucker

Readme

Keywords

Package Sidebar

Install

npm i create-date

Weekly Downloads

4

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker