Skip to main content
Version: 15.x (API 15) [Current]

Class DateTimeSpanExtensions

Utility functions for System.DateTime and System.TimeSpan.

Assembly: Dalamud.dll​
Declaration
public static class DateTimeSpanExtensions

Methods​

LocAbsolute(DateTime)​

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

Declaration
public static string LocAbsolute(this DateTime when)
Returns​

System.String: The formatted string.

Parameters​
TypeNameDescription
System.DateTimewhenWhen.
Remarks​

The string will be formatted according to Square Enix Account region settings, if Dalamud default language is English.

LocRelativePastLong(DateTime, TimeSpan)​

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

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.

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.

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.

Declaration
public static string LocRelativePastShort(this DateTime when)
Returns​

System.String: The formatted string.

Parameters​
TypeNameDescription
System.DateTimewhenWhen.