DateTimeExtensions.From Method

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

From(DateTime, DateTime, bool)

Returns a textual representation of a date relative to another date.

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

Parameters

date
System.DateTime

The (UTC) date to return as text.

from
System.DateTime

The (UTC) date from which to calculate relative time.

abbrev
bool

Returns

string

Returns the relative time from the specified date, e.g. "3 hours ago".