Comment by ffsm8

Comment by ffsm8 18 hours ago

2 replies

the article has examples of unexpected behavior with timestamps too, so... How do you covert to your desired format without going through Date? Please don't say date-fns

austin-cheney 5 hours ago

I do not believe you understood the comment you replied to. A date number, whether from Date.now() or the Temporal equivalent, is not a time stamp value. It’s just a number.

  • ffsm8 4 hours ago

    Then I do not believe you understood the article you've commented on, because it essentially about the thing you handwaved away via

    > Then you can format the Date.now() number it into whatever other format you want.

    The while thing is about how to transition from a date, wherever it's string or timestamp to a date object. The idea is that you'll either format it to a string, do equality checks, calculate durations etc after after. Your idea of using timestamps doesn't address anything the article was about