If using a library via CDN (like shown in the post) then day.js is a great choice. If you are using a bundler with tree shaking (like Vite), you might want to look into date-fns for similar functionality.
day.js
date-fns
Yes, you're a right. date-fns is also a very good library for handling dates and time. Works especially well in React
difference between dayjs and date-fns: npm-compare.com/date-fns,dayjs/#ti...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If using a library via CDN (like shown in the post) then
day.jsis a great choice. If you are using a bundler with tree shaking (like Vite), you might want to look intodate-fnsfor similar functionality.Yes, you're a right.
date-fnsis also a very good library for handling dates and time. Works especially well in Reactdifference between dayjs and date-fns: npm-compare.com/date-fns,dayjs/#ti...