mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
move format_time_delta to own file
This commit is contained in:
parent
4041f22f61
commit
a8d6f332a8
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use chrono::TimeDelta;
|
||||
|
||||
pub fn format_time_delta(time_delta: &TimeDelta) -> String {
|
||||
let negative: bool = time_delta.abs() > *time_delta;
|
||||
let negative = *time_delta < TimeDelta::zero();
|
||||
let time_delta = time_delta.abs();
|
||||
let hours = time_delta.num_hours();
|
||||
let minutes = time_delta.num_minutes() - time_delta.num_hours() * 60;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue