Re: PersianComputing Digest, Vol 21, Issue 6 (fwd)
> 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/ I'm not sure how the date data type can be representation agnostic. What ever the OS provides (via a system call) is in reference to a starting point in some calendar. On UNIX systems, this is traditionally the number of seconds since January 1, 1970, i.e. Gregorian. GetSystemTime on Win32 returns a structure, which represents the Gregorian date. ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: The New Alef
On Wed, 23 Feb 2005, Roozbeh Pournader wrote: > There has been a new Alef around for quite a while. For those who don't > live in Iran or haven't seen it yet for any reasons, a photo is > available at: > > http://bamdad.org/~roozbeh/alef.jpg Smart! That can be useful in hex numbers written in Arabic script too. Indeed they want it to look like one letter, and don't want the Alef to be read as "1". > It's used on car plates, but the exact usage is disputed among a few > friends of mine. What do you mean exactly? > roozbeh --behdad http://behdad.org/ ___ PersianComputing mailing list PersianComputing@lists.sharif.edu http://lists.sharif.edu/mailman/listinfo/persiancomputing
Re: PersianComputing Digest, Vol 21, Issue 6 (fwd)
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