chore: update docs

This commit is contained in:
Erica Marigold 2023-08-23 18:50:02 +05:30 committed by GitHub
parent f8599bf8ef
commit 6ba7a3bd04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)