Table of Contents

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 TimeSpan

The time from now.

format TimestampFormat

The 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 DateTimeOffset

Timestamp to format.

format TimestampFormat

The 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 DateTime

The time from now.

format TimestampFormat

The format to render the timestamp in. Defaults to relative.

Returns

string

A formatted timestamp relative to now.