memory-download icon indicating copy to clipboard operation
memory-download copied to clipboard

Migrate date operations to Day.js for better parsing

Open abhideepm opened this issue 3 years ago • 3 comments

abhideepm avatar May 26 '22 14:05 abhideepm

Would like to take this up

abhideepm avatar May 26 '22 14:05 abhideepm

What is the benefit of Day.js over basic string parsing (current implementation)?

The current implementation parses the string and creates a JSON object that can be utilized by the frontend (public/app.js) which does not have direct access to node modules.

cal-overflow avatar May 27 '22 01:05 cal-overflow

In my experience, date operations have too many edge cases to be handled (Like DST, Leap year, etc.) which I think are handled way better by libraries like Day.js as they are production ready. I think it'll be much more extensible if we need to add any other date related features in the future.

abhideepm avatar May 27 '22 06:05 abhideepm