Crate czas

Source
Expand description

Czas is a library for converting chrono timestamps into localized text.
For example, 2020-01-01 01:23:45 would be converted (in Polish) to pierwszego stycznia dwa tysiące dwudziestego roku o pierwszej dwadzieścia trzy i czterdzieści pięć sekundy.
The library provides the public ToLocalizedText trait, which can be implemented against any struct to provide your own translations in any language/format.
The library comes with one struct implementation of this trait, Czas, which supports localization in Polish.

Re-exports§

pub use crate::errors::CzasError;
pub use crate::mapping::polish::date_to_polish_genitive;
pub use crate::mapping::polish::hours_to_polish_locative;
pub use crate::mapping::polish::minutes_to_polish_nominative;
pub use crate::mapping::polish::month_to_polish_genitive;
pub use crate::mapping::polish::seconds_to_polish_nominative;
pub use crate::mapping::polish::year_to_polish_genetive;

Modules§

errors
mapping

Structs§

Czas
Default implementation of ToLocalizedText in Polish

Traits§

ToLocalizedText
Trait for converting chrono::NaiveDateTime timestamps into localized text