type alias Intl.Formattable
unstable
Types that can be formatted using Intl.DateTimeFormat methods.
This type defines what values can be passed to Intl.DateTimeFormat methods for internationalized date and time formatting. It includes standard Date objects and Temporal API date/time types.
Examples #
#
// Using with Date object
const date = new Date();
const formatter = new Intl.DateTimeFormat('en-US');
console.log(formatter.format(date));
// Using with Temporal types (when available)
const instant = Temporal.Now.instant();
console.log(formatter.format(instant));