mirror of
https://github.com/0x5eal/chrono-lc.git
synced 2024-12-13 13:30:39 +00:00
chore: update docs
This commit is contained in:
parent
f8599bf8ef
commit
6ba7a3bd04
1 changed files with 5 additions and 10 deletions
15
README.md
15
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)
|
||||
|
|
Loading…
Reference in a new issue