I'm dubious about supporting astronomical calendars, because any algorithm we use to calculate them will be "wrong" in some sense.

For Iran, the 1925 law that established the calendar did not specify how to determine leap years. Different sources give their own methods to calculate leap years, and these sources will say that the other sources are inaccurate for dates in the future or far in the past. It's better to not get into the middle of these conflicts.

If we do support an astronomical calendar despite these hazards, then we should be careful not to call it "the Persian calendar" or even "the Persian solar Hijri calendar". Instead, we should call it something like "the Persian calendar as specified on Wikipedia in 2025" (but use the actual source, not Wikipedia), and use a similar qualifier as part of the programmatic name rather than just calling the function "gregorian_to_persian".

I assume the Thai solar calendar is similar since it's astronomical. However, I know little about it.

Reply via email to