Project owner:Adam Peller
Authors:Seth Lytle, Adam Peller, Marcus Reimann

Adds a reference to a bundle containing localized custom formats to be used by date/time formatting and parsing routines.


The user may add custom localized formats where the bundle has properties following the same naming convention used by dojo/cldr: dateFormat-xxxx / timeFormat-xxxx and the pattern string should match that format. See dojo/date/locale::format() for details. The resources must be loaded by via the dojo/i18n prior to use.


require(["dojo/date/locale", "dojo/i18n!dojo/cldr/nls/gregorian"], function(locale, gregorian){
  var bundle = {
    timeFormat-custom: "HH:mm:ss.zzzz",
    dateFormat-custom: "d-MMMM-y"
  locale.addCustomFormats(gregorian, bundle);
Error in the documentation? Can’t find what you are looking for? Let us know!