-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Related d3/d3#495. TODO:
- Decide on localizable implementation. (Locale-defined function.)
- Decide on directive. (
%o) - Implement formatting.
- Implement padding.
- Implement parsing.
- Test.
This implementation works in English:
var suffixes = ["th", "st", "nd", "rd"];
function suffix(number) {
var tail = number % 100;
return suffixes[(tail < 11 || tail > 13) && (tail % 10)] || suffixes[0];
}However, it’s not clear how we should localize this behavior. Perhaps the locale definition can include a JavaScript function?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels