Skip to content

Commit

Permalink
fix(api): intervention calculator v1 didn't add 30 minutes for specia…
Browse files Browse the repository at this point in the history
…l hour
  • Loading branch information
syukoGit committed Dec 4, 2023
1 parent 01e859c commit 5e553bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FirefighterStats/Server/Helpers/Calculators/CalculatorV1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public override (double DayHours, double SpecialHours, double NightHours) Calcul
dayMinutes += 30;
}

if (specialMinutes > 0)
{
specialMinutes += 30;
}

double nightHours = Math.Round(nightMinutes / 60.0, 2);
double specialHours = Math.Round(specialMinutes / 60.0, 2);
double dayHours = Math.Round(dayMinutes / 60.0, 2);
Expand Down

0 comments on commit 5e553bd

Please sign in to comment.