Converts a legacy Date to a Temporal value.
Without a timeZone, returns a Temporal.Instant — the time-zone-free
representation of the absolute moment the Date refers to. Pass a
timeZone to anchor the instant in a specific zone and get a
Temporal.ZonedDateTime back. To get a PlainDate or PlainDateTime,
chain the zoned conversion: fromDate(date, tz).toPlainDate().
Converts a legacy
Dateto a Temporal value.Without a
timeZone, returns aTemporal.Instant— the time-zone-free representation of the absolute moment theDaterefers to. Pass atimeZoneto anchor the instant in a specific zone and get aTemporal.ZonedDateTimeback. To get aPlainDateorPlainDateTime, chain the zoned conversion:fromDate(date, tz).toPlainDate().