Formats a Date object into a UI5-compatible date string.
The date to format (Date object or ISO string).
The target format pattern.
The formatted date string.
Pure function (no browser context). Supports the five patterns in DATE_FORMATS.
ControlError if the format is unsupported or the date is invalid.
formatDateForUI5(new Date(2024, 0, 15), 'yyyy-MM-dd'); // '2024-01-15'formatDateForUI5(new Date(2024, 0, 15), 'dd.MM.yyyy'); // '15.01.2024' Copy
formatDateForUI5(new Date(2024, 0, 15), 'yyyy-MM-dd'); // '2024-01-15'formatDateForUI5(new Date(2024, 0, 15), 'dd.MM.yyyy'); // '15.01.2024'
Formats a Date object into a UI5-compatible date string.