Thanks for those contributions, but my understanding is that the Persian calendar is astronomical, which means any numeric calculation would be an approximation, right? What approximation is being used here? Does the code work for dates arbitrarily in the past or future, when time_t is 64 bits for example? (I suspect the answer is "no".) That sort of thing.
For more on this subject, please see Reingold & Dershowitz's excellent book "Calendrical Calculations", 3rd ed. <http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/>. It mentions multiple ways to approximate the Persian calendar, among other things. I suspect that modifying "date" to support the Persian calendar (much less Hebrew, Hindu, Islamic, etc.) would be nontrivial, and would be best done in a library that could be used by many programs, not just "date". You might want to look at Emacs's calendar code for ideas for such a project, as the Emacs code was written by Reingold a while back and is high quality. (It's in Lisp, though.) _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils