dateformatterbyarif

1.3.3 • Public • Published

I shared the date formatting operations that I think are used most frequently.

const { dateToTimeStamp, add3Hour, formatDate, formatDateAndTime, formatTime, addDays, nowToTimeStamp, timeStampToDate,formatDateAndTimeForFileName } = require('dateformatterbyarif');

console.log(dateToTimeStamp(new Date()))
console.log(add3Hour(new Date()))
console.log(formatDate(new Date()))
console.log(formatDateAndTime(new Date()))
console.log(formatTime(new Date()))
console.log(add3Hour(addDays(new Date(), 0)))
console.log(add3Hour(nowToTimeStamp()))
console.log(timeStampToDate(1625525359.629))

console.log(formatDateAndTimeForFileName(new Date()))

//////

1625525529.904
2021-07-06T01:52:09.911Z
06.07.2021
06.07.2021 01:52
01:52
2021-07-06T01:52:09.915Z
1970-01-19T22:32:05.530Z
2021-07-05T22:49:19.629Z
06072021_01-52-17

Package Sidebar

Install

npm i dateformatterbyarif

Weekly Downloads

1

Version

1.3.3

License

ISC

Unpacked Size

4.22 kB

Total Files

3

Last publish

Collaborators

  • arifhayir