Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
asgs112756y@codepotato I don't know, either. See if you could read the spec (assuming this is covered) to know if there are any UBs
-
@heyheni yeah but why does it fail? I wanna understand the error not just use something else. I wouldn't install a full library just to compare if a date is before/after another lol
-
@codepotato it's how the ISO standard is set up actually, so no blame on JS here. Sure JS lacks a lot of helper functions found in most other languages, but that example should work the same in all languages that follows ISO to the letter. ISO 8859 something I believe.
Look up http://codingblocks.net podcast. Last two episodes deals with the ISO on dates in different languages. Sounds boring, but they make it interesting and fun. -
If I had to guess, the extra space makes the date parser think you're going to add in a time, but you don't. Do it just parses the date and fucks off, giving a blank time.
I mean you acting as if programming ISN'T bitchy and specific about small things like this.
Related Rants
Fuck JS...
Can somebody explain me?
rant
white-space
date
js