Re: Capitalization of localized month and day names (to_char() with 'TMmonth', 'TMday', etc.) - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: Capitalization of localized month and day names (to_char() with 'TMmonth', 'TMday', etc.)
Date
Msg-id CAC+AXB04GvuxTS7L0=P75nChcUgvy4MJu0jLxjK+JH2cpEB_HQ@mail.gmail.com
Whole thread Raw
In response to Capitalization of localized month and day names (to_char() with 'TMmonth', 'TMday', etc.)  (Magnus Holmgren <magnus.holmgren@millnet.se>)
Responses Re: Capitalization of localized month and day names (to_char() with 'TMmonth', 'TMday', etc.)
List pgsql-hackers

On Wed, Oct 6, 2021 at 11:09 AM Magnus Holmgren <magnus.holmgren@millnet.se> wrote:

There's just this tiny but seemingly obvious issue that I can't believe I
haven't noticed until now: to_date(now(), 'TMmonth') returns 'october' in an
English locale (en_US.UTF-8 at least). Names of months and weekdays are proper
nouns and as such *always* capitalized in English, so that seems wrong to me.

IMHO, the patterns of TO_CHAR() do as promised in the documentation [1]:

MONTH full upper case month name (blank-padded to 9 chars)
Month full capitalized month name (blank-padded to 9 chars)
month full lower case month name (blank-padded to 9 chars)

What you are proposing looks more like a new feature than a bug.


Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: More business with $Test::Builder::Level in the TAP tests
Next
From: Maxim Orlov
Date:
Subject: Re: Pre-allocating WAL files