DateTimeExtensions.FromNow Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Overloads

FromNow(DateTime, Boolean) Returns a textual representation of the specified date from now. This is sometimes called "time ago" or "relative time".
FromNow(NullableTime>) Returns a textual representation of the specified date from now. This is sometimes called "time ago" or "relative time".

FromNow(DateTime, Boolean)

Returns a textual representation of the specified date from now. This is sometimes called "time ago" or "relative time".

public static string FromNow(this DateTime date, bool abbrev = false)

Parameters

date
System.DateTime
abbrev
System.Boolean

Returns

System.String

Returns the time from now, e.g. "3 hours ago".

FromNow(NullableTime>)

Returns a textual representation of the specified date from now. This is sometimes called "time ago" or "relative time".

public static string FromNow(this DateTime? date)

Parameters

date
System.Nullable{System.DateTime}

Returns

System.String

Returns the time from now, e.g. "3 hours ago".