It's nice to use but there's an outstanding issue in dealing with Daylight Savings Time raised a few months ago which meant we had to move to a different library. We now use Luxon, which works very well.
I was quite happy with dayjs until I had to deal with issues with different timezones and DST. We started to migrate to luxon and luckily the API is mostly the same. I'd strongly recommend to consider this in your decision to use dayjs as it could help you from some hard to spot bugs.
WordPress & Full Stack Developer | 12+ yrs in PHP, JS & Node.js
- Building scalable WP solutions & sharing dev tips
- Sharing what I learn |
https://muzammil.dev
Work
Full Stack Developer at Freelance | WordPress & JavaScript Specialist
Isn't date-fns better? I didn't tested it out but I think that dayjs will include whole library in production build. In the other hand date-fns has is tree shakable.
Didn't heared of day.js before. Looks as light as you said.
Thanks, I'll keep it in mind for my future projects.
Thank you for your comment, I am glad that it is useful to you 🤗
It's nice to use but there's an outstanding issue in dealing with Daylight Savings Time raised a few months ago which meant we had to move to a different library. We now use Luxon, which works very well.
Oh thanks for your contribution 🎉 i was unaware of this topic 🙈
No problem, it's this one
github.com/iamkun/dayjs/issues/1260
but I see there have been a lot of similar issues raised since
I was quite happy with dayjs until I had to deal with issues with different timezones and DST. We started to migrate to luxon and luckily the API is mostly the same. I'd strongly recommend to consider this in your decision to use dayjs as it could help you from some hard to spot bugs.
Thank you for your contribution! 🤗
It seems amazing, i'll definitely use in my next project. Thanks for sharing...
Thanks to you for your comment, good luck with that next project 😜
We can write our own right.
Isn't date-fns better? I didn't tested it out but I think that dayjs will include whole library in production build. In the other hand date-fns has is tree shakable.
Dayjs also supports tree-shaking, although date-fns is another great library for handling dates in JavaScript 🤗