title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Monday, June 15, 2015 | |
We had one guy at a previous job responsible for hunting down the ins and outs of time management with JavaScript clients (well, and our C# server-side), and I remember him basically boiling down what he'd found to, "Dates are a pain." One level more technical than that: "Convert everything to UTC immediately, all the time, except for the final step before displaying to the user." I've worked with dates enough to know he wasn't kidding, but this takes the cake:
Seems a better fix for ES6 would be to have parseLocal() and parseUTC() (or even a parseISO() and parseColloquial(), if you're not into the whole brevity thing) with a legacy parse() sticking around to keep acting consistently wonky [sic]. With public APIs comes public responsibility. And once you release v1, you've largely already sunk yourself. You will find mistakes, and you will have to fix them with an eye on preserving "wrong" legacy behavior. I hate breaking "fixes" like this one just a little bit more than bizarre, hard to understand, initial decision like, well, this one. Labels: dates, javascript posted by ruffin at 6/15/2015 03:15:00 PM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|