Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Function formatDateForUI5

    • Formats a Date object into a UI5-compatible date string.

      Parameters

      • date: DateInput

        The date to format (Date object or ISO string).

      • format: string

        The target format pattern.

      Returns string

      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'