[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nmh-workers] Ordinal Indicators.
From: |
Robert Elz |
Subject: |
Re: [nmh-workers] Ordinal Indicators. |
Date: |
Mon, 08 Jul 2019 18:43:41 +0700 |
Date: Mon, 08 Jul 2019 11:37:10 +0100
From: Ralph Corderoy <address@hidden>
Message-ID: <address@hidden>
| I had a need today to have date(1) produce 8th for today
Yes, strftime() has no ordinals, and (as best I understand it) locales
don't either. To get them you need to code it yourself
D=$(date +%d)
case "$D" in
[023]1) ORD=st;;
[02]2) ORD=nd;;
[02]3) ORD=rd;;
*) ORD=th;;
esac
case "$D" in
0*) SP=;;
*) SP=' ';;
esac
and then deal with internationalising that for yourself... (good luck).
Then
date "+%A, the${SP}%e${ORD} of %B"
or whatever.
kre
ps: this is not really an nmh-workers issue!
- Re: [nmh-workers] Formatting HTML to Text: netrik., (continued)
- Re: [nmh-workers] Formatting HTML to Text: netrik., Ralph Corderoy, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Ralph Corderoy, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Ronald F. Guilmette, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Robert Elz, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., David Levine, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Robert Elz, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Ronald F. Guilmette, 2019/07/07
- Re: [nmh-workers] Formatting HTML to Text: netrik., Robert Elz, 2019/07/07
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators.,
Robert Elz <=
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ken Hornstein, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ken Hornstein, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Robert Elz, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ken Hornstein, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ralph Corderoy, 2019/07/08
- Re: [nmh-workers] Ordinal Indicators., Ken Hornstein, 2019/07/08