Jc3s5h reopened this task as "Open".
Jc3s5h added a comment.

I have been experimenting with various extreme values of the Julian year, as great as positive 10 billion, and am finding erratic results for the value of the julian date ($jd) and the Gregorian date ($gregorian). I found that for values that are too large, $jd could be 0, negative, or of the same order of magnitude as the year (when it should be about 365 times the year). Also, for values that are too large, $gregorian might or might not be "0/0/0".

I should add that I don't have another tool at my disposal to independently convert Julian to Gregorian for enormous dates, so I can't say for sure if the correction in PHP is correct between the years 101,994 and 1,465,071, only that there are no obvious problems.

I found the largest Julian calendar date that does not produce any obvious problem is y = 1465072, m = 9, d = 17. This results in $jd = 536,838,867. The value of $gregorian is "10/17/1,465,102" (thousand separators added).

A simple solution, if you don't mind not converting less than a year's worth of dates in the distant future, is to add a test that the Julian year must be < 1465072.


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

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

To: thiemowmde, Jc3s5h
Cc: gerritbot, hoo, aude, Lydia_Pintscher, Jc3s5h, Smalyshev, Jonas, thiemowmde, Aklapper, mschwarzer, Avner, Lewizho99, Maathavan, debt, Gehel, D3r1ck01, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, Deskana, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to