Re: Calendar support in localization - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Re: Calendar support in localization
Date
Msg-id CALAY4q_ZYwiO1BfjLfzpC6dSxFT1RFcj4kq+7FYjfdOT1GpS_A@mail.gmail.com
Whole thread Raw
In response to Re: Calendar support in localization  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers


On Tue, Mar 30, 2021 at 11:16 AM Daniel Verite <daniel@manitou-mail.org> wrote:
     
The conversions from julian dates are not necessarily hard, but the
I/O functions means having localized names for all days, months, eras
of all calendars in all supported languages. If you're thinking of
implementing this from scratch (without the ICU dependency), where
would these names come from? OTOH if we're using ICU, then why
bother reinventing the julian-to-calendars conversions that ICU
already does?


i donno why  but  currently we are using our own function for converting (see j2date and date2j) maybe it's written before ICU but i think ICU helps in adding other calendar support easly. Regarding  I/O functions postgresql hard coded days and months names on array and just parse and string compare, if it is not on the list then error(see datetime.c) and it will be the same for other calendar but i think we don't need all  that if we use ICU   

regards 
Surafel  

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Next
From: Laurenz Albe
Date:
Subject: Re: Prevent query cancel packets from being replayed by an attacker (From TODO)