On 2025-07-15 10:29, Bruno Haible wrote:

For Iran, there is an authoritative source (some institute at the
university of Teheran), cited by the wikipedia page [4] that gives the
complete list of leap years for the time period that we are interested
in (1925 to 2100).

That list of years says it was compiled by Hujjat al-Islam Mehdi Sohrabi, a cleric in the University of Tehran. Although that's a reasonable source I wouldn't call it authoritative, and there are other good sources.

Part of the problem is that the 1925 Iranian law, still in force, does not specify which location is used for solar noon vs the vernal equinox, and various sources use Tehran, Isfahan, and standard time (3.5 hours ahead of UTC). Although I guess Sohrabi used Tehran, his list doesn't say, which is a bit slipshod. When push comes to shove (e.g., in the year 2091 assuming the law doesn't change before then) nobody knows what Iran will do about these glitches in practice.


what matters is the actual use in Iran,
not some astronomical calculation.

Is your point that the current Iranian calendar is astronomical, not calculated? That is, that it's based on astronomical observations, not astronomical calculations? If so, I agree. But this means that for "actual use in Iran" one cannot in general calculate dates far in the future, as any such calculations will be wrong in some cases. Similarly for dates far in the past.

Also, "actual use in Iran" has differed over the years. From 1976 to 1978 Iran officially used an imperial calendar, not the Solar Hijri calendar. The Gnulib code doesn't implement this (not that I'm suggesting you add it!). And if we go back before 1925 things get hairier still. So the Gnulib code is not implementing "actual use in Iran" except for a period near the present.

As I understand it, the Gnulib code calculates an arithmetic approximation to a proleptic calendar which matches actual Iranian use near the present, but which is wrong if one goes far enough in the past or future. If you've tested the code, I'll take your word that it's valid for the Gregorian years 1926 through 2090 (if one ignores the shah's hiccup in the 1970s). However, it's not reliable outside that range.

Perhaps we should change strftime to fail with EOVERFLOW if asked to convert dates outside the 1925-2091 range? Similarly for the Thai calendar.

Reply via email to