diff --git a/osu.Game/Utils/HumanizerUtils.cs b/osu.Game/Utils/HumanizerUtils.cs
index 398c76a09f..5b7c3630d9 100644
--- a/osu.Game/Utils/HumanizerUtils.cs
+++ b/osu.Game/Utils/HumanizerUtils.cs
@@ -10,27 +10,21 @@ namespace osu.Game.Utils
public static class HumanizerUtils
{
///
- /// Humanizes a string using the system culture, then falls back if one cannot be found.
- ///
- /// A localization lookup failure will throw an exception of type
- ///
+ /// Turns the current or provided date into a human readable sentence
///
- /// The time to humanize.
- /// A humanized string of the given time.
- public static string Humanize(DateTimeOffset dateTimeOffset)
+ /// The date to be humanized
+ /// distance of time in words
+ public static string Humanize(DateTimeOffset input)
{
- string offset;
-
+ // this works around https://github.com/xamarin/xamarin-android/issues/2012 and https://github.com/Humanizr/Humanizer/issues/690#issuecomment-368536282
try
{
- offset = dateTimeOffset.Humanize();
+ return input.Humanize();
}
catch (ArgumentException)
{
- offset = dateTimeOffset.Humanize(culture: new CultureInfo("en-US"));
+ return input.Humanize(culture: new CultureInfo("en-US"));
}
-
- return offset;
}
}
}