date-custom-format

1.0.0 • Public • Published

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.

/date-custom-format/

    Package Sidebar

    Install

    npm i date-custom-format

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    13.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • faramj