Class DateTimeExtensions
DateTime Extensions.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public static class DateTimeExtensions
Methods
GetRelativeTime(DateTime)
Gets string literal for relative time from now since the DateTime provided. String output is in most appropriate "x time units ago" Example: If DateTime provided is 30 seconds before now, then result will be "30 seconds ago"
Declaration
public static string GetRelativeTime(this DateTime time)
Parameters
Type | Name | Description |
---|---|---|
DateTime | time | DateTime in UTC to compare against DateTime.UtcNow |
Returns
Type | Description |
---|---|
String | Encoded string. |