This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

date-formatter

0.1.1 • Public • Published

date formatter

license ci coverage version download

install

$ npm install --save date-formatter

example

var df = require('date-formatter');
var s = df(
    new Date(2015, 0, 2, 3, 4, 5, 6),
    'YYYY-MM-DDThh:mm:ss.S'
);
console.log(s); // '2015-01-02T03:04:05.6'

format

YYYY = four-digit year

MM   = two-digit month (01 = January, etc.)
DD   = two-digit day of month (01 through 31)
M    = one-digit month (1 = January, etc.)
D    = one-digit day of month (1 through 31)

hh   = two digits of hour (00 through 23)
mm   = two digits of minute (00 through 59)
ss   = two digits of second (00 through 59)
h    = one digits of hour (0 through 23)
m    = one digits of minute (0 through 59)
s    = one digits of second (0 through 59)

S    = one or more digits representing a decimal fraction of a second
O    = time zone designator (Z or +hh:mm or -hh:mm)

test

$ npm test

license

MIT

Readme

Keywords

Package Sidebar

Install

npm i date-formatter

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • npm