daniel added a comment.

@Jc3s5h: You mean, we could have a calendar model for "Broken Gregorian"? I 
like that idea!

It seems clear to me that we shouldn't just allow any input for 
Gregorian/Julian dates: the "123rd of Juli" or the "15th of Kittens" should not 
be accepted. However, I don't think the date parser should be responsible for 
checking for leap years when encountering February 29. Perhaps we can have a 
validator for checking that. Similarly, the parser should probably accept April 
31, since it really only deals with syntax. I have no strong feelings about 
whether we should have a validator that would reject April 31. That's mostly a 
product decision. From the technical perspective, we cannot rely on dates 
getting cleanly normalized to ISO anyway - that should rarely fail for 
Gregorian dates, but we can never totally rely on it.

(As to parsers vs validators: the parser turns an input string into a TimeValue 
object, the validator checks whether a given TimeValue object is acceptable. 
Parsers do not apply to API input. Validators are applied to API input, but not 
to old values found in the database).


TASK DETAIL
  https://phabricator.wikimedia.org/T85296

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Lydia_Pintscher, Jc3s5h, Liuxinyu970226, Ricordisamoa, Addshore, 
thiemowmde, JanZerebecki, Aklapper, daniel, Smalyshev, Wikidata-bugs, aude, 
Malyacko



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to