29_timesheet-management #64
1 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ fn load_all_shards(base_folder: &Path) -> Result<Vec<LocalizedShard>, StreamdErr
|
||||||
/// Format hours with sign for display.
|
/// Format hours with sign for display.
|
||||||
fn format_diff(hours: f64) -> String {
|
fn format_diff(hours: f64) -> String {
|
||||||
if hours >= 0.0 {
|
if hours >= 0.0 {
|
||||||
format!("+{:.1}h", hours)
|
format!("+{:.1}h", hours.abs())
|
||||||
} else {
|
} else {
|
||||||
format!("{:.1}h", hours)
|
format!("{:.1}h", hours)
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,7 @@ fn format_diff(hours: f64) -> String {
|
||||||
|
|
||||||
/// Format hours for display without sign.
|
/// Format hours for display without sign.
|
||||||
fn format_hours(hours: f64) -> String {
|
fn format_hours(hours: f64) -> String {
|
||||||
format!("{:.1}h", hours)
|
format!("{:.1}h", hours.abs())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the weekday abbreviation.
|
/// Get the weekday abbreviation.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue