Trait timeago::Language
[−]
[src]
pub trait Language { fn too_low(&self) -> &'static str; fn too_high(&self) -> &'static str; fn ago(&self) -> &'static str; fn get_word(&self, tu: TimeUnit, x: u64) -> &'static str; fn place_ago_before(&self) -> bool { ... } }
Interface for connecting natural languages to use for the formatting See "language" module documentation for details.
Required Methods
fn too_low(&self) -> &'static str
What to emit by default if value is too high
fn too_high(&self) -> &'static str
What to emit by default if value is too low
fn ago(&self) -> &'static str
Chunk of text to put at the end by default
fn get_word(&self, tu: TimeUnit, x: u64) -> &'static str
Get word representing the given time unit, for using with x
number
Provided Methods
fn place_ago_before(&self) -> bool
For German and such
Implementations on Foreign Types
impl<L: Language + ?Sized> Language for Box<L>
[src]
Implementors
impl Language for English
impl Language for Russian
impl Language for Belarusian
impl Language for German
impl Language for Polish