JavaScript DayJS

JavaScript DayJS is a good library to alter dates.

DayJS is a small js library that parses; validates & manipulates dates & times. It's very similar to moment but better. We often have to alter dates from ISO time to time zones to date formats so this is a good library to utilize.

A simple example that demonstrates the use is below:

1import dayjs from "dayjs";
2const currentDate = dayjs();
3const formattedDate = currentDate.format('YYYY-MM-DD HH:mm:ss');
4console.log(formattedDate);