The hint and link from @aivar-paalberg helped a lot.
The date format settings are stored in the hidden file ~/Library/Preferences/.GlobalPreferences.plist
. Values can be queried with defaults
in Terminal.app and also be changed using defaults write
.
Getting
% defaults find AppleICU
Found 1 keys in domain 'Apple Global Domain': {
AppleICUDateFormatStrings = {
1 = "y-MM-dd";
2 = "y-MM-dd";
};
}
1
is short, 2
is medium, 3
is long and 4
is full in the CLDR date formats (with precision to the calendar day).
Setting
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "1" "yyyyMMdd"
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "2" "d. MMM ’yy"
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "3" "d. MMMM yyyy"
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "4" "EEEE 'KW'ww, d. MMMM yyyy"
Unfortunately, System Settings will not show an example result in the dropdown if it differs from the predefined formats:
For English-language locales alone, the formats will default to a number of variants, as of CLDR v43:
- short with month number:
M/d/yy
default = US
d-M-yy
MV
d/M/y
HK, ZW
d/M/yy
AU, JM, SG
d/MM/yy
NZ
dd.MM.y
CH
dd/MM/y
int., AE, GB
dd/MM/yy
BE, BW, MZ, IN
y-MM-dd
CA, SE
y/MM/dd
ZA
- ISO 8601, shortest formats:
yyyyDDD
ordinal day of the year
yyyyMMdd
day of the month of the year
YYYY'W'wwe
day of the week of the year
yyMMdd
and yy-MM-dd
with implied century were supported before the 2004 revision.
- medium with abbreviated month name or number:
MMM d, y
default = US
d MMM y
int., AE, GB
d/MM/y
NZ
dd MMM y
BE, BW, MT, ZA
dd MMM,y
ZW
dd-MM-y
MV
dd-MMM-y
BZ, IN, PK
- ISO 8601:
yyyy-DDD
yyyy-MM-dd
YYYY-'W'ww-e
- long with complete month name:
MMMM d, y
default = US
d MMMM y
int., AE, GB, MV
dd MMMM y
BW, BZ, MT, ZA, ZW
- full with day of the week:
EEEE, MMMM d, y
default = US
EEEE d MMMM y
IE, MV
EEEE, d MMMM y
int., AE, GB
EEEE, d MMMM, y
IN
EEEE, dd MMMM y
BW, BZ, ZA, ZW
Apple / ICU supports all Date Field Symbols from UTS #35.
PS: I assume those AppleICUDateFormatStrings
are used internally as the default template
somewhere in DateFormatter
.
defaults
. I haven't tried but there are suggestions which claimed to be working in this discussions.apple.com thread