- https://askubuntu.com/questions/21316/how-can-i-customize-a-system-locale
- https://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/
Used to make lower case abbreviations (mostly for ExifTool)
$ date +%Y-%b-%d
2020-May-23
$ sudo cp /usr/share/i18n/locales/en_US /usr/share/i18n/locales/en_US-lcase_ab
# Update en_US-lcase_ab
$ diff /usr/share/i18n/locales/en_US /usr/share/i18n/locales/en_US-lcase_ab
80c80
< abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
---
> abday "sun";"mon";"tue";"wed";"thu";"fri";"sat"
90,95c90,95
< abmon "Jan";"Feb";/
< "Mar";"Apr";/
< "May";"Jun";/
< "Jul";"Aug";/
< "Sep";"Oct";/
< "Nov";"Dec"
---
> abmon "jan";"feb";/
> "mar";"apr";/
> "may";"jun";/
> "jul";"aug";/
> "sep";"oct";/
> "nov";"dec"
Install and use
$ sudo localedef -f UTF-8 -i en_US-lcase_ab en_US-lcase_ab.UTF-8
$ LC_TIME=en_US-lcase_ab.UTF-8 date +%Y-%b-%d
2020-may-23
Apparently the names are slightly different when reported by locale
.
However, still failing in Perl when trying both ways.
$ locale -a | rg en_US
en_US
en_US.iso88591
en_US-lcase_ab.utf8
en_US.utf8
$ LC_TIME=en_US-lcase_ab.UTF-8 exiftool ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "en_US.lcase_ab.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
$ LC_TIME=en_US-lcase_ab.utf8 exiftool ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "en_US.lcase_ab.utf8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").