1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Use floor instead of ceiling

This commit is contained in:
dekrain 2022-02-17 00:09:17 +01:00
parent c124034cf3
commit 333a305af3
No known key found for this signature in database
GPG Key ID: E20077A4AB510334

View File

@ -408,11 +408,11 @@ namespace osu.Game.Online.Leaderboards
if (difference.TotalMinutes < 1)
return CommonStrings.TimeNow.ToString();
if (difference.TotalHours < 1)
return $@"{Math.Ceiling(difference.TotalMinutes)}min";
return $@"{Math.Floor(difference.TotalMinutes)}min";
if (difference.TotalDays < 1)
return $@"{Math.Ceiling(difference.TotalHours)}h";
return $@"{Math.Floor(difference.TotalHours)}h";
if (difference.TotalDays < 7)
return $@"{Math.Ceiling(difference.TotalDays)}d";
return $@"{Math.Floor(difference.TotalDays)}d";
return string.Empty;
}