Library API
    Preparing search index...

    Function withUtcParts

    • Returns a new Date instance with updated UTC calendar or clock fields applied to the given date. Non-mutating (pure copy-on-write).

      Parameters

      • date: Date

        The source Date instance

      • parts: Partial<UtcPartsOptions>

        Partial UTC parts to overwrite on the source date

      Returns Date

      A new UTC Date instance with the specified parts updated