Thanks Amir Behzad....

I enjoyed browsing the ICC site...very cool...

Yes, that was my guess as well...ie apps would
have to convert back-and-forth before commiting
them to DB tables...

In fact that is why I worte a Perl class/package
so that such apps could use it to store a decimal
number (actually the Unit Tic Count) in the DB
tables which then would allow some ops like
equal, less than, etc...

I also noted a pgbe work by Behdad for the
PostgreSQL engine which seems to have solved
some locale issues....and that PostgreSQL does
have some localization features including LC_TIME
(Formatting of Dates and Times) but that might be
just Year/Month/Day vs Month/Day/Year type of
deals...

Thanks and keep up the good work...
Mehdi Montaseri

On 6/7/05, AmirBehzad Eslami <[EMAIL PROTECTED]> wrote:
On Saturday, June 04, 2005 10:18 AM, Medi Montaseri <mailto:[EMAIL PROTECTED]> wrote:
 
> Databases usually have Date related operations such as equality,
> less than, greater than, etc . But most databases have the Gregorian
> Calendar and not Jalalian.
> Any solutions or hacks?
 
Dear Medi,
 
We have faced with a similar problem at IranCivilCenter.com[1] before.
The Persian Registration Form[2], asks people to specify their Birth Date in Jalali.
But the "Server-side Form Processor", converts this "Submitted Jalali Date" to "Gregorian"; making it suitable to be saved to DB (MySQL).
 
When we want to display users's information, we convert the saved Gregorian date to Jalali. [3][4]
 
There are some useful libraries for Gregorian-to-Jalali date conversion at http://sourceforge.net/projects/farsitools/
 
Storage:
Jalali Date --> Convert to Gregorian --> Save to DB
 
Retrieval:
Gregorian --> Convert to Jalali --> Display on Browser
 
 
 

Hope this helps,
Behzad
----- Original Message -----
Sent: Saturday, June 04, 2005 10:18 AM
Subject: DB and Date data type

Hi,

I was wondering how Date data type is dealt with in such databases
as PostgreSQL or mySQL?

Databases usually have Date related operations such as equality,
less than, greater than, etc . But most databases have the Gregorian
Calendar and not Jalalian.

Any solutions or hacks?

Thanks
Mehdi


_______________________________________________
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing


_______________________________________________
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to