Details

This is a map of codes to date patterns. You should not hard-code specific patterns: instead, use this map to get the appropriate pattern for the user's locale.

The code consists of a base pattern code and modifier codes separated by underscores.

Base code is one of SHORT, MEDIUM, LONG and FULL.

Modifier codes are:

The patterns are from Java's java.text.SimpleDateFormat.

You can use more "JavaScript-style" codes: lower-case with colon (':') separators.

You can view the results across available locales on the Compare Date Patterns page.

Sample

datepat.json?pat=SHORT%2CSHORT_CENTURY

Field Value