mirror of
https://github.com/0x5eal/chrono-lc.git
synced 2024-12-12 12:50:36 +00:00
chore(README): minor changes
This commit is contained in:
parent
33bbea3e07
commit
8ed5bf6d48
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ This crate allows to format [chrono](https://github.com/chronotope/chrono) dates
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Put this in your Cargo.toml:
|
Include the dependency in `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -12,7 +12,7 @@ chrono = "0.4.56"
|
||||||
chrono_lc = "0.1.3"
|
chrono_lc = "0.1.3"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then put this in your `lib.rs` or `main.rs`:
|
Import the required modules into `lib.rs` or `main.rs`:
|
||||||
|
|
||||||
```rs
|
```rs
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
|
@ -20,7 +20,7 @@ use chrono_lc::LocaleDate;
|
||||||
```
|
```
|
||||||
|
|
||||||
You can choose to import just parts of chrono instead of the whole prelude.
|
You can choose to import just parts of chrono instead of the whole prelude.
|
||||||
Please see ['chrono`'s documentation](https://docs.rs/chrono/).
|
Please see ['`chrono`'s documentation](https://docs.rs/chrono/).
|
||||||
|
|
||||||
To format a chrono `Date` or `DateTime` object, you can use the `formatl` method:
|
To format a chrono `Date` or `DateTime` object, you can use the `formatl` method:
|
||||||
|
|
||||||
|
@ -36,4 +36,4 @@ println!("{}", dt.formatl("%c", "fr"));
|
||||||
```
|
```
|
||||||
|
|
||||||
All of [chrono's formatting placeholders](https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
|
All of [chrono's formatting placeholders](https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
|
||||||
work except for `%3f`, `%6f` and `%9f` (but `%.3f`, `%.6f` and `%.9f` work normally)
|
work except for `%3f`, `%6f` and `%9f` (but `%.3f`, `%.6f` and `%.9f` work normally).
|
||||||
|
|
Loading…
Reference in a new issue