Skip to content

Commit

Permalink
feat: better time fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaumy committed Sep 21, 2023
1 parent 4a7a254 commit f70318b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/infra/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ where
let diff = current_time.clone() - time_to_fmt.clone();
match diff {
// In the future
_ if diff.num_milliseconds() < 0 => time_to_fmt.format("%Y-%m-%d %H:%M").to_string(),
_ if diff.num_milliseconds() < 0 => time_to_fmt.format("%y-%-m-%-d %-H:%M").to_string(),
// Same year...
_ if time_to_fmt.year() != current_time.year() => {
time_to_fmt.format("%Y-%m-%d").to_string()
Expand Down

0 comments on commit f70318b

Please sign in to comment.