A day of the month: 1-31 depending on the month
Hour of the day in 24 time: 0-23
Millisecond of the second: 0-999
Minute of the hour: 0-59
A month of the year: 1-12
The full, four digit year.
import {
createUtcFullDate,
dateOnlyUtcIsoStringToFullDate,
TimezoneName,
toDateOnlyUtcIsoString,
} from 'date-vir';
const day = toDateOnlyUtcIsoString(createUtcFullDate('2026-10-02T00:00:00.000Z'));
dateOnlyUtcIsoStringToFullDate(day, TimezoneName['America/Denver']);
// outputs `{year: 2026, month: 10, day: 2, hour: 0, minute: 0, second: 0, millisecond: 0, timezone: 'America/Denver'}`
Converts a DateOnlyUtcIsoString into a FullDate at the start of that same calendar day in the given timezone. The calendar day never shifts. The start of a day is usually midnight but can be later in timezones that have had a DST transition at midnight.