On Wed, 23 Feb 2005, mohsen ali momeni wrote: > Now something else , > For AddDate and DateDiff functions, I need an algorithm which > calculates the number of leap years between two given Date. Is there > any such algorithm or at least a documentation for the above > algorithms (jalali.c) so that i can find it in the code myself? (Or > AddDate, DateDiff functions ready in ideal case) > > Regards, > Mohsen A. Momeni
Well, that's why I'm saying your implementation is not what MySQL people expect. The date data type is representation-agnostic itself, and AddDate, DateDiff, etc work with the date data type (at least in MySQL). What you need is functions to covert from internal date representation to Iranian calendar string, and vice versa. You don't need (and should not) implement all date functions again. --behdad http://behdad.org/ _______________________________________________ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing