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

From Thomas Munro
Subject Re: Calendar support in localization
Date
Msg-id CA+hUKGKJkR2OCuF0nQ04qD0jWmqzPCkL2Xc9S0GeB=gb3=+asQ@mail.gmail.com
Whole thread Raw
In response to Re: Calendar support in localization  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
On Sat, Mar 27, 2021 at 6:51 AM Daniel Verite <daniel@manitou-mail.org> wrote:
> now_str        | 17/mägabit/2013 après l’Incarnation 18:22:07.566 UTC+1

Very nice!

> For instance with the ethiopic calendar, the query above displays today as
> 17/mägabit/2013 and 1 month from now as 18/miyazya/2013,
> while the correct result is probably 17/miyazya/2013 (?)
>
>
> I'm not sure at this point that there should be a new set of
> data/interval/timestamp types though, especially if considering
> the integration in core.
>
> About intervals, if there were locale-aware functions like
>  add_interval(timestamptz, interval [, locale]) returns timestamptz
> or
>  sub_timestamp(timestamptz, timestamptz [,locale]) returns interval
> that would use ICU to compute the results according to the locale,
> wouldn't it be good enough?

+1, I'd probably do that next if I were hacking on this...



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Provide more information to filter_prepare
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] add concurrent_abort callback for output plugin