Example of Specifying the Date Format

Following are five examples of config.xml coding using each tag:

Example 1

Specifies pattern-MMddyyyy for the pattern of the default date format. The date is displayed as MM dd yyyy.

  

<format>

    <param name=“selectFormat” value=“pattern-MMddyyyy”/>

</format>

  

Example 2

Specifies pattern-MMddyyyy for the pattern of the default date format and slash for the separator. The date is displayed as MM/dd/yyyy.

  

<format>

    <date-format pattern=“pattern-MMddyyyy”

                    separator=“slash”/>

</format>

  

Example 3

Specifies pattern-MMddyyyy for the pattern of the default date format and hyphen for the separator of the Export output. The date is displayed as MM dd yyyy. In addition, the date is displayed as MM-dd-yyyy.

  

<format>

    <param name=“selectFormat” value=“pattern-MMddyyyy” />

    <date-format export-separator=“hyphen”/>

</format>

  

Example 4

Specifies en for the locale and pattern-ddMMyyyy for the pattern corresponding to the locale. The separator is omitted in the locale-format tag, so slash, specified in the date-format tag, is applied as the separator corresponding to the locale. The date for the locale en is displayed as dd/MM/yyyy.

  

<format>

    <date-format pattern=“pattern-MMddyyyy”

                    separator=“slash”/>

    <locale-format>

         <date-format pattern=“pattern-ddMMyyyy”/>

         <locale>en</locale>

    </locale-format>

</format>

  

Example 5

Specifies period for the separator of the Export output in the case of the locale ja and en.

As the date for the Export output in the case of the locale ja and en, dd.MM.yyyy is displayed.

The locale de is ignored because the locale de is not defined.

  

<format>

    <modify-format>

         <date-format pattern=“pattern-ddMMyyyy”

                      export-separator=“period”/>

         <locale>ja</locale>

         <locale>en</locale>

         <locale>de</locale>

    </modify-format>

</format>

  

If the same tag specification is duplicated, the last specification is valid.