timestamp-to-date

Returns date on YYYY-mm-DD format from timestamp

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
timestamp-to-date
001.1.06 years ago6 years agoMinified + gzip package size for timestamp-to-date in KB

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