wmde / DataValuesJavaScript

JavaScript implementations of all basic DataValue classes, associated parsers and formatters
http://wikiba.se
Other
5 stars 1 forks source link

Do not default to 1 for day/month #49

Closed thiemowmde closed 10 years ago

thiemowmde commented 10 years ago

I finally found the reason why these strange dates are always showing up in bug reports. Both our parsers are totally fine with the day and month set to zero. This is very relevant when the precision is set to "year" or larger. Day, month and time are undefined then. Undefined day and month should be 0, not 1. This is confusing and just not necessary.

Bug: 71956

tobijat commented 10 years ago

@thiemowmde is this still needed? The related bug has been closed?

thiemowmde commented 10 years ago

Yes, this is still needed and part of the "parsing errors" users are reporting. We are still saving "2014-01-01" when the user enters "2014". In my opinion it's "wrong" (at least pointless and confusing) to default to "1" without taking the precision into account.