mirror of
https://github.com/0x5eal/chrono-lc.git
synced 2024-12-12 12:50:36 +00:00
chore(README): rust example syntax highlighting
This commit is contained in:
parent
c9608a4d2c
commit
d84ef5c320
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ chrono_locale = { git = "https://github.com/0x5eal/chrono-locale.git", rev = "2a
|
||||||
|
|
||||||
Then put this in your `lib.rs` or `main.rs`:
|
Then put this in your `lib.rs` or `main.rs`:
|
||||||
|
|
||||||
```
|
```rs
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use chrono_locale::LocaleDate;
|
use chrono_locale::LocaleDate;
|
||||||
```
|
```
|
||||||
|
@ -24,7 +24,7 @@ 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:
|
||||||
|
|
||||||
```
|
```rs
|
||||||
let dt = FixedOffset::east_opt(34200)
|
let dt = FixedOffset::east_opt(34200)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.with_ymd_and_hms(2001, 7, 8, 0, 34, 59)
|
.with_ymd_and_hms(2001, 7, 8, 0, 34, 59)
|
||||||
|
|
Loading…
Reference in a new issue