Localizing date and time validation

About this task

Dates can be stored in a standard format, but displayed according to the required format. If the date is entered on a screen, it must be verified. The date format is specified in the Applications Manager Locale Details screen.

To localize date and time validation:

Save the <INSTALL_DIR>/repository/eardata/platform/war/yfcscripts/Validation.js file as Validation_<language>_<country>.js (with all translations in escaped Unicode format) and make modifications to the new file as indicated in the following steps.

Procedure

  1. Ensure that the date and time values match the entries specified in the Locale fields in the Applications Manager.
  2. Change the [yfcDateFormat] (MM/dd/yyyy), [yfcTimeFormat] (HH:mm:ss) and [yfcDateTimeFormat] (MM/dd/yyyy HH:mm:ss) variables to contain the correct date and time format.

    These date and time formats are according to the United States English version. When you create a Validation.js file for another language, these formats change accordingly. The following table specifies the date and time formats.

    Table 1. Date and time variable formats
    Date Element Description
    yyyy Four-digit year, for example, 2009
    MM Two-digit month, for example, 05 to indicate May
    dd Two-digit day, for example, 01 to indicate the first day of the month
    mm Minutes
    HH Hours
    ss Seconds
  3. Localize the pop-up messages and calendar formats as described in Localizing calendar pop-up Windows in the console.