mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add a fallback for humanizer localization failure
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Utils;
|
||||
|
||||
namespace osu.Game.Graphics
|
||||
{
|
||||
@ -71,7 +71,7 @@ namespace osu.Game.Graphics
|
||||
Scheduler.AddDelayed(updateTimeWithReschedule, timeUntilNextUpdate);
|
||||
}
|
||||
|
||||
protected virtual string Format() => Date.Humanize();
|
||||
protected virtual string Format() => HumanizerUtils.Humanize(Date);
|
||||
|
||||
private void updateTime() => Text = Format();
|
||||
|
||||
|
Reference in New Issue
Block a user