blob: 747b47a12d1f91df428e79170d7eb05715e629c9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
url()
{
echo "https://raw.githubusercontent.com/unicode-org/cldr-json/refs/heads/main/cldr-json/cldr-dates-full/main/$1/ca-gregorian.json"
}
if [ $# -lt 1 ]
then
echo "Usage: datefmt locale..." >&2
exit 1
fi
for l in "$@"
do
[ $# -gt 1 ] && printf '%s:\t' "$l"
curl -s "$(url "$l")" | jq -r --arg l "$l" \
'.main.[$l].dates.calendars.gregorian.dateFormats.short'
done
|