timestamp-to-date
v1.1.0
Published
Returns date on YYYY-mm-DD format from timestamp
Downloads
2,994
Readme
timestamp-to-date
Returns date on 'yyyy-MM-dd HH:mm:ss' format from timestamp
Installation
$ npm i timestamp-to-date
Usage
'use strict'
const timestampToDate = require('.timestampToDate');
console.log(timestampToDate('1484448039504','yyyy-MM-dd HH:mm:ss')) // => 2017-01-15 10:40:39
console.log(timestampToDate('1484448039504','yyyy-MM-dd')) // => 2017-01-15