Okay I hate %x ("Preferred date representation based on locale") in English.
("03/09/21" nonsense!!!)
So I'm going to have the gettext()'d format string for strftime() be
this, which everyone can simply replace in their localization
(e.g., "%Y-%m-%d" or just "%F", if you want ISO 8601 "YYYY-MM-DD"
format, which I do love for technical use.)
%B %e, %Y
That's full month name (_should_ be localized), one digit day,
four digit year. So in English:
March 9, 2021
I realize this is almost identical to what I had before ("%e %B %Y"),
_but_, since the format string is now wrapped in gettext(), hopefully
it will be more flexible. :)
-bill!
On Sun, Mar 07, 2021 at 01:01:31PM -0500, Mark Kim wrote:
> > > Would it be easier to just do
> > >
> > > <?= strftime("%x", mktime(0, 0, 0, 3, 5, 2021)) ?>
> > >
> > > .. and skip month_names[], its lookup, relying on the user to figure out
> > > how to "translate" "%1\$s %2\$s %3\$s", and documenting how to
> translate it?
> >
> > Would this address Shin-Ichi's issue?
|