Skip to main content

Class DateTimeSpanExtensions

Utility functions for System.DateTime and System.TimeSpan.

Assembly: Dalamud.dll
View Source
Declaration
public static class DateTimeSpanExtensions

Methods

LocAbsolute(DateTime)

Formats an instance of System.DateTime as a localized absolute time.

View Source
Declaration
public static string LocAbsolute(this DateTime when)
Returns

System.String: The formatted string.

Parameters
TypeNameDescription
System.DateTimewhenWhen.

LocRelativePastLong(DateTime, TimeSpan)

Formats an instance of System.DateTime as a localized relative time.

View Source
Declaration
public static string LocRelativePastLong(this DateTime when, TimeSpan floorBy)
Returns

System.String: The formatted string.

Parameters
TypeNameDescription
System.DateTimewhenWhen.
System.TimeSpanfloorByThe alignment unit of time span.

LocRelativePastShort(DateTime, TimeSpan)

Formats an instance of System.DateTime as a localized relative time.

View Source
Declaration
public static string LocRelativePastShort(this DateTime when, TimeSpan floorBy)
Returns

System.String: The formatted string.

Parameters
TypeNameDescription
System.DateTimewhenWhen.
System.TimeSpanfloorByThe alignment unit of time span.

LocRelativePastLong(DateTime)

Formats an instance of System.DateTime as a localized relative time.

View Source
Declaration
public static string LocRelativePastLong(this DateTime when)
Returns

System.String: The formatted string.

Parameters
TypeNameDescription
System.DateTimewhenWhen.

LocRelativePastShort(DateTime)

Formats an instance of System.DateTime as a localized relative time.

View Source
Declaration
public static string LocRelativePastShort(this DateTime when)
Returns

System.String: The formatted string.

Parameters
TypeNameDescription
System.DateTimewhenWhen.