From 6ba7a3bd04d30690fc9cd2602c32e9adf515059b Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Wed, 23 Aug 2023 18:50:02 +0530 Subject: [PATCH] chore: update docs --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 30186b7..01329e6 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,20 @@ # chrono-locale -This crate allows to format [chrono](https://github.com/chronotope/chrono) dates with localized months and week days. - -It's in early development and everything could change. Use with caution! +This crate allows to format [chrono](https://github.com/chronotope/chrono) dates with localized months and week days. Backwards comptible fork of [Alex-PK/chrono-locale](https://github.com/Alex-PK/chrono-locale), now works with the latest version of chrono. ## Usage Put this in your Cargo.toml: -``` +```toml [dependencies] -chrono = "0.4" -chrono_locale = "0.1" +chrono = "0.4.56" +chrono_locale = { git = "https://github.com/0x5eal/chrono-locale.git", rev = "f8599bf" } ``` Then put this in your `lib.rs` or `main.rs`: ``` -extern crate chrono; -extern crate chrono_locale; - use chrono::prelude::*; use chrono_locale::LocaleDate; ``` @@ -34,5 +29,5 @@ let dt = FixedOffset::east(34200).ymd(2001, 7, 8).and_hms_nano(0, 34, 59, 1_026_ println!("{}", dt.formatl("%c", "fr")); ``` -All of [chrono's formatting placeholders](https://docs.rs/chrono/0.4.6/chrono/format/strftime/index.html) +All of [chrono's formatting placeholders](https://docs.rs/chrono/0.4.56/chrono/format/strftime/index.html) work except for `%3f`, `%6f` and `%9f` (but `%.3f`, `%.6f` and `%.9f` work normally)