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
Type | Name | Description |
---|---|---|
System.DateTime | when | When. |
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
Type | Name | Description |
---|---|---|
System.DateTime | when | When. |
System.TimeSpan | floorBy | The 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
Type | Name | Description |
---|---|---|
System.DateTime | when | When. |
System.TimeSpan | floorBy | The 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
Type | Name | Description |
---|---|---|
System.DateTime | when | When. |
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
Type | Name | Description |
---|---|---|
System.DateTime | when | When. |