> On Jan 28, 2020, at 6:51 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes:
>> On 2020-01-28 04:05, Mark Dilger wrote:
>>> German uses both Sonnabend and Samstag for Saturday, so don’t you have to
>>> compare to a list of values anyway?
>
>> Yeah, good point. If it doesn't accept both "Sonnabend" and "Samstag",
>> then it's not really usable.
>
> If we're going to insist on that, then the entire patch is junk.
I’m not insisting, just asking about the design. If it only works with one
name supported per weekday per language, and per month per language, I’m not
going to object. I was just curious if you were going to support multiple
names anyway, and if that made the question about the Greek case folding less
pressing.
> Indeed, I don't even know where we could get the knowledge of which
> name(s) to accept, because strftime is surely only going to tell us
> one of them.
I haven’t played with this yet, but per the manual page for strftime_l:
> %A is replaced by national representation of the full weekday name.
>
> %a is replaced by national representation of the abbreviated weekday
> name.
>
> %B is replaced by national representation of the full month name.
>
> %b is replaced by national representation of the abbreviated month
> name.
Which I think gives you just the preferred name, by whatever means the library
decides which of Sonnabend/Samstag is the preferred name. But then the manual
page goes on to say:
> %E* %O*
> POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY
> %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide
> alternate representations.
>
> Additionally %OB implemented to represent alternative months names
> (used standalone, without day mentioned).
This is the part I haven’t played with, but it sounds like it can handle at
least one alternate name. Perhaps you can get the alternates this way?
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company