2.0.8 • Published 4 years ago

date-format-conversion v2.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

date-format-conversion

Converter for date format conversion

Basic usage

$ npm i date-format-conversion --save-dev

To do:

import dateFormatter from 'date-format-conversion';
//the module would export a function, you can also rename it

/*Input string*/
dateFormatter('2020-03-01', 'yyyy/MM/dd');//return '2020/03/01'
dateFormatter('2020/03/01', 'yyyy-MM-dd');//return '2020-03-01'
dateFormatter('2020-03-01', 'yyyy.MM.dd');//return '2020.03.01'

/*Input timestamp*/
dateFormatter(1584596625304, 'MM-DD hh:mm:ss');//return '03-19 13:43:45'
dateFormatter(1584596625304, 'MM-yyyy-dd');//return '03-2020-19'
dateFormatter(1584596625304, 'yyyy-MM-dd');//return '2020-03-19'
dateFormatter(1584596625304, 'yyyy/MM/dd');//return '2020/03/19'
dateFormatter(1584596625304, 'yyyy:MM:dd');//return '2020:03:19'
2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago