1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Ordinal formatting.
//!
//! Use this module for locale-aware ordinal markers such as `1st`, `21.` or
//! `42-ะน`.
pub use OrdinalDisplay;
pub use OrdinalLike;
use crate;
/// Creates a human-readable ordinal formatter using the default English locale.
///
/// # Examples
///
/// ```rust
/// assert_eq!(humfmt::ordinal(1).to_string(), "1st");
/// assert_eq!(humfmt::ordinal(23).to_string(), "23rd");
/// ```
/// Creates a human-readable ordinal formatter with a custom locale.
///
/// # Examples
///
/// ```rust
/// use humfmt::locale::English;
///
/// let out = humfmt::ordinal_with(11, English);
/// assert_eq!(out.to_string(), "11th");
/// ```