Converts a FullDate into the DateOnlyUtcIsoString of the calendar day it falls on in its own timezone. To get the day in a different timezone, convert the date first with toNewTimezone.
toNewTimezone
import {TimezoneName, toDateOnlyUtcIsoString} from 'date-vir';toDateOnlyUtcIsoString({ year: 2026, month: 10, day: 2, hour: 23, minute: 30, second: 0, millisecond: 0, timezone: TimezoneName['America/Denver'],}); // outputs `'2026-10-02T00:00:00.000Z'` (even though this is October 3rd in UTC) Copy
import {TimezoneName, toDateOnlyUtcIsoString} from 'date-vir';toDateOnlyUtcIsoString({ year: 2026, month: 10, day: 2, hour: 23, minute: 30, second: 0, millisecond: 0, timezone: TimezoneName['America/Denver'],}); // outputs `'2026-10-02T00:00:00.000Z'` (even though this is October 3rd in UTC)
Converts a FullDate into the DateOnlyUtcIsoString of the calendar day it falls on in its own timezone. To get the day in a different timezone, convert the date first with
toNewTimezone.