Day.js library - How to solve invalid date bug in Safari when using dayjs
We are using Day.js
to show formatted dates in GitDuck, but we recently discovered that Safari (Mac and iPhone) was not parsing it correctly. It was showing "Invalid date".
The fix was simple, all we need to do was use the format dayjs(date).format('YYYY-MM-DD')
You can check more about Day.js at https://www.npmjs.com/package/dayjs