Library API
    Preparing search index...

    Function getUtcParts

    • Extracts all UTC calendar and clock components from a Date instance as a structured object. Month and weekday are 1-indexed (1 for January, 1 for Monday through 7 for Sunday). Defaults to current timestamp (new Date()) if no date is provided.

      Parameters

      • date: Date = ...

        Optional Date instance to inspect (defaults to new Date())

      Returns UtcParts

      An object containing { year, month, day, weekday, hours, minutes, seconds, milliseconds }