Fundamentals
    Preparing search index...

    Class TimeSpan

    Represents a time interval.

    Index

    Constructors

    Properties

    days: number
    hours: number
    microseconds: number
    milliseconds: number
    minutes: number
    nanoseconds: number
    seconds: number
    ticks: number
    totalDays: number
    totalHours: number
    totalMicroseconds: number
    totalMilliseconds: number
    totalMinutes: number
    totalNanoseconds: number
    totalSeconds: number

    Methods

    • Converts the TimeSpan to a JSON string that works in JSON serialization. Returns the TimeSpan in C# compatible format: [-][d.]hh:mm:ss[.fffffff]

      Returns string

      C# compatible TimeSpan string representation.

    • Converts the TimeSpan to a C# compatible string format. Returns the TimeSpan in format: [-][d.]hh:mm:ss[.fffffff]

      Returns string

      C# compatible TimeSpan string representation.

    • Parses a C# compatible TimeSpan string and returns a TimeSpan instance. The string format should match: [-][d.]hh:mm:ss[.fffffff]

      Parameters

      • value: string

        String representation of TimeSpan.

      Returns TimeSpan

      A TimeSpan instance with all properties populated.

      If the string format is invalid.