0.3.0 • Published 6 years ago

compile-date v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

compile-date


A simple, lightweight module, that compiles a string of a Date to a Date object.

Installation

npm install compile-date

Usage

let compileDate = require('@beselig/compileDate');
let compiledDate = compileDate('23.12.2018', {format: 'DDMMYYYY'});

Formats

You must provide the initial format. Currently suppoted formats:

  • DDMMYYYY
  • MMDDYYYY
  • YYYYMMDD

    Output should be – Thu, 23 Dec 2018 00:00:00 GMT

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.