New to Kendo UI for VueStart a free 30-day trial

Parsing and Formatting of Dates and Numbers

The Kendo UI for Vue Internationalization package utilizes the Kendo UI Internationalization modules for date and number parsing and formatting, and builds on top of them to adapt them to the Vue context.

For more information on parsing and formatting date and number options, refer to the kendo-intl GitHub repository.

Using CLDR-JSON Data

When you parse and format dates and numbers for a locale that is different from the default en-US one, you have to load CLDR data.

The CLDR data is available in the following locations:

  1. CLDR data is split into functional groupings among the cldr-core, cldr-numbers-full, cldr-dates-full, and other packages which directly download the CLDR data files.

    The Kendo UI for Vue components use the cldr-core, cldr-dates-full, and cldr-numbers-full packages. For more information about the available CLDR packages, refer to the article on JSON packing.

  2. CLDR data is combined in the cldr-data NPM package which unzips the files in your node_modules folder through a post-installation script.

As a data reference for all locales, the following examples use the cldr-core, cldr-numbers-full, and cldr-dates-full packages.

  1. Install the needed CLDR packages by running the following command:

    sh
    npm install --save cldr-core cldr-numbers-full cldr-dates-full
  2. Import and load the required files in your component from the following locations:

    • cldr-core/supplemental/LOCALE_FILE.json
    • cldr-PACKAGE_NAME/main/LOCALE_NAME/LOCALE_FILE.json

You can also import the data from the cldr-data package at the cldr-data/main/LOCALE_NAME/LOCALE_FILE.json location.

Date Parsing

Date parsing converts a string into a Date object by using the specific settings of the locale. For more information on date parsing, refer to the kendo-intl Date Parsing section.

Change Theme
Theme
Loading ...

Date Formatting

Date formatting converts a Date object into a human-readable string by using the specific settings of the locale. For more information on date formatting, refer to the kendo-intl Date Formatting section.

Change Theme
Theme
Loading ...

Number Parsing

Number parsing converts a string into a Number object by using the specific settings of the locale. For more information on number parsing, refer to the kendo-intl Number Parsing section.

Change Theme
Theme
Loading ...

Number Formatting

Number formatting converts a Number object into a human-readable string using the specific settings of the locale. For more information on number formatting, refer to the kendo-intl Number Formatting section.

Change Theme
Theme
Loading ...

General Formatting

General formatting provides methods for independent placeholder and type formatting by using the specific settings of the locale. For more information on general formatting, refer to the kendo-intl General Formatting section.

Change Theme
Theme
Loading ...