4 ms·
I fixed the same bug today, it happens when using YYYY instead of yyyy as a dateformat. YYYY is the year of the week the day falls in.
by MrHus 14y ago
I fixed the same bug today, it happens when using YYYY instead of yyyy as a dateformat. YYYY is the year of the week the day falls in.
- lstrojny 14y agoCould you elaborate what exactly is the bug there?
- MrHus 14y agoIn my case I had a date that I needed to parse from JSON. It was in this format: 2012-01-21. I parsed it using YYYY-MM-dd. It should have been yyyy-MM-dd for the reasons above. It is not technically a bug but it real easy to get wrong. Perhaps they should have picked sometimg other than YYYY for week years.