Skip to content

farhadamjady/date-custom-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Convert javascript date to an ideal format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published