date-vir - v8.6.2
    Preparing search index...

    Function createUtcIsoString

    • Parse the given DateLike and convert it directly into a UTC ISO 8601 string, always ending in Z (for example '2024-01-05T01:01:01.001Z'). The input is always interpreted as UTC time. This is a shorthand for toUtcIsoString(createUtcFullDate(dateLike)).

      Parameters

      • dateLike: Readonly<DateLike>

        The original date representation to be converted into a UTC ISO string.

      Returns `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z`

      import {createUtcIsoString} from 'date-vir';

      createUtcIsoString('June 1, 2024');
      createUtcIsoString(new Date());

      Error: if a valid date cannot be created.

      toUtcIsoString for converting an existing FullDate.