日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class DateTimeExtensions

    DateTime Extensions.

    Inheritance
    Object
    DateTimeExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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.

    Back to top Generated by DocFX