DDNet - v0.10.4
    Preparing search index...

    Function timeString

    • Converts a number of seconds to a DDNet finish time string.

      Parameters

      • totalSeconds: number

        The time in seconds to convert.

      • Optionaloptions: {
            centiSecondsDisplayBehavior?: boolean | "auto";
            centiSecondsSubscript?: boolean;
            forceHoursDisplay?: boolean;
        }

        Options for formatting the time string.

        • OptionalcentiSecondsDisplayBehavior?: boolean | "auto"

          Whether to display centiseconds, or to let the function decide based on the time. If set to "auto", centiseconds will only be displayed if the time is less than 1 hour.

          "auto"
          
        • OptionalcentiSecondsSubscript?: boolean

          Whether to display centiseconds as subscript instead of superscript.

          false
          
        • OptionalforceHoursDisplay?: boolean

          Whether to always display hours, even if the time is less than 1 hour.

          false
          

      Returns string

      "03:23"
      
      "1:03¹²"