thiemowmde added projects: Patch-For-Review, DataValues. thiemowmde added a comment.
> I find it alarming that 31 September was corrected to 1 October. [...] Is the > code making the correction taking the calendar model into account? Currently not. We are using PHP's DateTime parsing as a fallback when parsing date strings, in addition to our own parsers. You can see this in action: Typing "+2015-02-31T00:00:00Z" triggers our own parser and results in "31 February", "2015-02-31" triggers PHP's parser and results in "3 March". I find the calculations PHP does not helpful and would love to turn them off, but unfortunately there is no way to do that (other than implementing our own parser and not using PHP's). I'm currently trying to add code that prevents such calculations and stores dates like "2015-02-31" as entered. The fact that "2015-02-31" can be stored via the API but is magically "corrected" when editing that value via the UI (that's a broken roundtrip) is a bug and must be fixed. Related patches: - https://github.com/DataValues/Time/pull/27 - https://github.com/DataValues/Time/pull/39 - https://gerrit.wikimedia.org/r/#/c/193817/ TASK DETAIL https://phabricator.wikimedia.org/T85296 REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>. EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: thiemowmde Cc: Jc3s5h, Liuxinyu970226, Ricordisamoa, Addshore, thiemowmde, JanZerebecki, Aklapper, daniel, Smalyshev, Wikidata-bugs, aude _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
