Method Timestamp
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
Timestamp(TimeSpan, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(this 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(DateTimeOffset, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(this 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.
Timestamp(DateTime, TimestampFormat)
Creates a rendered timestamp.
public static string Timestamp(this 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 relative to now.