@amanda-hg/date-formats

1.0.1 • Public • Published

date-formats

This module returns a date format. You can write the format you want and it returns the date.

Usage

Just require the module like any other npm module

const date = require('date-formats');

Methods

This module has one method:

  • format: returns a date with the format date which one the user pass by param.

Example

format

Input:

const date = require('date-formats');

const dateFormat1 = date.format('DD-MM-YYYY');
console.log(dateFormat1);

const dateFormat2 = date.format('YYYY/MM/DD');
console.log(dateFormat2);

Output:

01-11-1999

1999/11/01

Readme

Keywords

none

Package Sidebar

Install

npm i @amanda-hg/date-formats

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.06 kB

Total Files

6

Last publish

Collaborators

  • amanda-hg