3 ms·
What I take away from this is we need better first class date support in JS. Ideally, we don't include things like this. But in swift / iOS dev you get foundati
by ericlewis 7y ago
What I take away from this is we need better first class date support in JS. Ideally, we don't include things like this. But in swift / iOS dev you get foundation + all of its awesome date handling. Dates are core to many apps. It should be first class.
- sametmax 7y agoThe JS stdlib is abysmal, which is ridiculous given the cost of netwotk. No uuid, no hashing, no zipping, no threading, limited random generation, super basic data structures... So I have no hope for better date handling.
- sixbrx 7y agoIf you mean dates as just dates (no time part) then I agree 100%! So many environments think that if a date is good, then a date+time must be even better so just have the latter (and perversely call them "dates"). We'll just set the time part to 0, what could go wrong? Then we get off by one dates when truncating the timestamp back down to just a date, when it happens in a different context than where the original timestamp ("date") was created and so falls on the wrong side of midnight, usually having gone through UTC in some intermediate system (if it didn't start there) with original context lost along the way. Had we really just wanted instants and not dates there would be no problem with that conversion, but a date is not an instant!