mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Merge pull request #26526 from bdach/fix-date-display-failing
Fix date failing to display on leaderboard for some scores with weird datetimes
This commit is contained in:
commit
a8b301c618
@ -59,7 +59,8 @@ namespace osu.Game.Extensions
|
||||
/// <returns>A short relative string representing the input time.</returns>
|
||||
public static string ToShortRelativeTime(this DateTimeOffset time, TimeSpan lowerCutoff)
|
||||
{
|
||||
if (time == default)
|
||||
// covers all `DateTimeOffset` instances with the date portion of 0001-01-01.
|
||||
if (time.Date == default)
|
||||
return "-";
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
Loading…
Reference in New Issue
Block a user