deadline

Associated Press style date & times for JavaScript & Node.js

npm install deadline
5 downloads in the last week
6 downloads in the last month

Deadline

Associated Press style style date & times for JavaScript & Node.js

Build Status

Usage

Create a Deadline object by passing in a JavaScript Date:

newYears = new Deadline new Date(2013, 0, 1, 0, 0)
moonWalk = new Deadline new Date(-14159040000)

#getTime() returns an AP-style time string:

newYears.getTime()
# > 'midnight'

moonWalk.getTime()
# > '9:56 p.m.'

#getDate() returns an AP-style date string:

newYears.getDate()
# > 'Jan. 1'

moonWalk.getDate()
# > 'July 20, 1969'
npm loves you