Re: More tzdb fun: POSIXRULES is being deprecated upstream

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: More tzdb fun: POSIXRULES is being deprecated upstream
Date: 2020-06-18 18:15:41
Message-ID: CA+Tgmob_yg0CWmiPq9QKyOnqDLAsnm2CZEMp75KSDQz0K0_z2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 18, 2020 at 1:05 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > It's a little confusing, though, that you documented it as Mm.n.d but
> > then in the text the order of explanation is d then m then n. Maybe
> > switch the text around so the order matches, or even use something
> > like Mmonth.occurrence.day.
>
> Yeah, I struggled with that text for a bit. It doesn't seem to make sense
> to explain that n means the n'th occurrence of a particular d value before
> we've explained what d is, so explaining the fields in their syntactic
> order seems like a loser. But we could describe m first without that
> problem.

You could consider something along the lines of:

This form specifies a transition that always happens during the same
month and on the same day of the week. m identifies the month, from 1
to 12. n specifies the n'th occurrence of the day number identified by
d. n is a value between 1 and 4, or 5 meaning the last occurrence of
that weekday in the month (which could be the fourth or the fifth). d
is a value between 0 and 6, with 0 indicating Sunday.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jose Luis Tallon 2020-06-18 18:21:56 Re: Internal key management system
Previous Message Andres Freund 2020-06-18 17:49:55 Re: [patch] demote