date-beautify
v2.0.0
Published
A node.js package for Abhay Kumar's excellent date beautify function.
Downloads
5
Readme
date-beautify
date formatter for javascript
Introduction
This is date-beautify, its allows you to to beautify your date.
Installation
npm i date-beautify
Example
const datebeautify = require('date-beautify');
datebeautify.today() // it will return current date with YYYY-MM-DD format
datebeautify.format("YYYY-MM-DD") // dateFormat('2019-07-30',false,false) 1st arg date 2nd arg weekdays show 3rd show time result =Tuesday, July 30, 2019 at 12:29:42 PM if both are true
datebeautify.display("YYYY-MM-DD") // Output based on provided date I.E 5 seconds ago., 2 minutes 31 seconds ago., 1 hours 14 minutes 43 seconds ago. or May 31, 2019
datebeautify.display("YYYY-MM-DD hh:mm:ss") // // Output based on provided date I.E 5 seconds ago., 2 minutes 31 seconds ago., 1 hours 14 minutes 43 seconds ago. or May 31, 2019 at 12:32:28 PM
Browser Support
It should work in all browsers