mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
24 lines
691 B
C#
24 lines
691 B
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using System;
|
|
|
|
namespace osu.Game.Graphics
|
|
{
|
|
public class DrawableJoinDate : DrawableDate
|
|
{
|
|
private readonly DateTimeOffset date;
|
|
|
|
public DrawableJoinDate(DateTimeOffset date) : base(date)
|
|
{
|
|
this.date = date;
|
|
}
|
|
|
|
protected override string Format() => Text = date.ToUniversalTime().Year < 2008 ?
|
|
"Here since the beginning" :
|
|
string.Format($"{date:MMMM yyyy}");
|
|
|
|
public override string TooltipText => string.Format($"{date:MMMM d, yyyy}");
|
|
}
|
|
}
|