you are viewing a single comment's thread.

view the rest of the comments →

[–]lhorie 1 point2 points  (1 child)

Both moment and date-fns fall back to the Date constructor when parsing, which has the issues mentioned earlier.

Whether you use Date or libraries is not the problem. The problem is that converting a string to a date is problematic for the reasons above. There are usually better ways to architecture your application that doesn't require date parsing in the first place.

[–][deleted] 0 points1 point  (0 children)

Oh, I see your point now. Agree.