Re: Ethiopian calendar year(DATE TYPE) are different from theGregorian calendar year - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Ethiopian calendar year(DATE TYPE) are different from theGregorian calendar year
Date
Msg-id 25594971-c8f2-38dd-d46a-d560518ba730@2ndQuadrant.com
Whole thread Raw
In response to Ethiopian calendar year(DATE TYPE) are different from the Gregoriancalendar year  (Lelisa Diriba <lelisa0404@gmail.com>)
List pgsql-hackers
On 26.12.2017 09:23, Lelisa Diriba wrote:
> In Ethiopia the year have 13 months and but in Gregorian calendar the
> year have 12 months,
> The Ethiopian society's are want to use his Ethiopian calendar year,i
> have the algorithm,
> but the way i add to the postgresql source code as EXTENSION? or to
> the backend(to kernel)? 
> 13th month have 5 days and in fourth year 13th month have 6 days.that
> means 1 year have 365.25 days,my algorithm converts  Gregorian
> calendar year to Ethiopian calendar year.

You might want to check first, if the system locale support already
solves this for you.
If so, you may want to introduce this not as an extension, but as a locale

At least a cursory search shows that on some systems the locales do

There was some discussion on this

https://stackoverflow.com/questions/20001463/postgresql-ethiopian-date-format

and also at least Apple seems to have an Ethiopian calendar locale

https://developer.apple.com/documentation/foundation/nscalendar

-- 
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
https://2ndquadrant.com/



pgsql-hackers by date:

Previous
From: Aleksandr Parfenov
Date:
Subject: Re: [HACKERS] Flexible configuration for full-text search
Next
From: PG Doc comments form
Date:
Subject: Rolycore