https://github.com/lynn/elm-ordinal
Elm library for making English ordinal strings (1st, 2nd, 3rd)
https://github.com/lynn/elm-ordinal
Last synced: 2 months ago
JSON representation
Elm library for making English ordinal strings (1st, 2nd, 3rd)
- Host: GitHub
- URL: https://github.com/lynn/elm-ordinal
- Owner: lynn
- License: bsd-3-clause
- Created: 2016-07-18T21:42:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T15:49:55.000Z (almost 6 years ago)
- Last Synced: 2025-02-28T20:40:14.498Z (3 months ago)
- Language: Elm
- Homepage:
- Size: 7.81 KB
- Stars: 6
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-ordinal
Elm library for making English ordinal strings (1st, 2nd, 3rd)## Example
```
import Ordinal exposing (ordinal, ordinalSuffix)ordinal 42 == "42nd"
ordinal 0 == "0th"
ordinal (-1) == "-1st"ordinalSuffix 42 == "nd"
ordinalSuffix 0 == "th"
ordinalSuffix (-1) == "st"
```## TODO
* Support other languages, perhaps.