Date ordinal
date¶
Wrapper around the system date(1) command that adds a %o format specifier for ordinal day suffixes (st, nd, rd, th). All other format strings pass through unchanged.
Example¶
date '+%B %-d' # => February 8
date '+%B %-d%o' # => February 8th
Arguments¶
- ... (string): date(1) arguments; use %o in the format string for the ordinal suffix
Exit codes¶
- 0: Always
Output on stdout¶
- Formatted date string