date-custom-format
v1.0.0
Published
This module convert js date format to custom format.
Downloads
1
Readme
This module convert js date format to custom format.
Install
Install with npm:
$ npm install --save date-custom-format
const DateCustomFormat = require('date-custom-format');
let dateCustomFormat = new DateCustomFormat( "#YYYY#/#MM#/#DD#", new Date() );
console.log( 'dateCustomFormat.convert()', dateCustomFormat.convert() );
let dateCustomFormat2 = new DateCustomFormat( "#YYYY#//#MM#//#DD#", new Date() );
console.log( 'dateCustomFormat2.convert()', dateCustomFormat2.convert() );
let dateCustomFormat3 = new DateCustomFormat( "#YYYY#//#MM#//#DD# #hh#:#mm#", new Date() );
console.log( 'dateCustomFormat3.convert()', dateCustomFormat3.convert() );
Running tests
$ node test.js
License
Released under the MIT License.