Re: Calendar support in localization

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Vik Fearing <vik(dot)fearing(at)enterprisedb(dot)com>
Subject: Re: Calendar support in localization
Date: 2021-03-29 09:21:02
Message-ID: CA+hUKGKJkR2OCuF0nQ04qD0jWmqzPCkL2Xc9S0GeB=gb3=+asQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 27, 2021 at 6:51 AM Daniel Verite <daniel(at)manitou-mail(dot)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...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-03-29 09:33:37 Re: [PATCH] add concurrent_abort callback for output plugin
Previous Message Amit Kapila 2021-03-29 09:13:23 Re: [PATCH] Provide more information to filter_prepare