Method Timestamp
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
Timestamp(TimeSpan, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(TimeSpan time, TimestampFormat format = TimestampFormat.RelativeTime)
Parameters
time
TimeSpanThe time from now.
format
TimestampFormatThe format to render the timestamp in. Defaults to relative.
Returns
- string
A formatted timestamp.
Timestamp(DateTime, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(DateTime time, TimestampFormat format = TimestampFormat.RelativeTime)
Parameters
time
DateTimeThe time from now.
format
TimestampFormatThe format to render the timestamp in. Defaults to relative.
Returns
- string
A formatted timestamp.
Timestamp(DateTimeOffset, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(DateTimeOffset time, TimestampFormat format = TimestampFormat.RelativeTime)
Parameters
time
DateTimeOffsetTimestamp to format.
format
TimestampFormatThe format to render the timestamp in. Defaults to relative.
Returns
- string
A formatted timestamp.