d3-time-format
d3-time-format copied to clipboard
Day-of-month with ordinal suffix.
This implementation is limited to ordinal as a suffix, so it won’t support ordinal indicators as prefixes.
TODO
- [x] Pick a directive (
%o). - [x] Format ordinal day-of-month in en-US locale.
- [ ] Format ordinal day-of-month in other locales?
- [ ] Allow the ordinal to be a prefix instead of a suffix, such as for Chinese?
- [ ] Decide how to parse ordinal day-of-month?
- [ ] It’s icky that the locale now contains code rather than being strictly declarative.
- [ ] Is there a better way to reuse logic across locales?
It appears the strftime npm package uses %o for ordinal day-of-month, too. Yay.
Any reason why this hasn't been merged?