Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/date/locale.js

  • Provides:

    • dojo.date.locale
  • Requires:

    • dojo.date in common
    • dojo.cldr.supplemental in common
    • dojo.regexp in common
    • dojo.string in common
    • dojo.i18n in common
  • dojo.date.locale.__FormatOptions

    • type
      Function
  • dojo.date.locale.__FormatOptions.selector

    • type
      String
    • summary
      choice of 'time','date' (default: date and time)
  • dojo.date.locale.__FormatOptions.formatLength

    • type
      String
    • summary
      choice of long, short, medium or full (plus any custom additions).  Defaults to 'short'
  • dojo.date.locale.__FormatOptions.datePattern

    • type
      String
    • summary
      override pattern with this string
  • dojo.date.locale.__FormatOptions.timePattern

    • type
      String
    • summary
      override pattern with this string
  • dojo.date.locale.__FormatOptions.am

    • type
      String
    • summary
      override strings for am in times
  • dojo.date.locale.__FormatOptions.pm

    • type
      String
    • summary
      override strings for pm in times
  • dojo.date.locale.__FormatOptions.locale

    • type
      String
    • summary
      override the locale used to determine formatting rules
  • dojo.date.locale.__FormatOptions.fullYear

    • type
      Boolean
    • summary
      (format only) use 4 digit years whenever 2 digit years are called for
  • dojo.date.locale.__FormatOptions.strict

    • type
      Boolean
    • summary
      (parse only) strict parsing, off by default
  • dojo.date.locale._getZone

    • parameters:
      • dateObject: (typeof Date)
        the date and/or time being formatted.
      • getName: (typeof boolean)
        Whether to return the timezone string (if true), or the offset (if false)
      • options: (typeof dojo.date.locale.__FormatOptions)
        The options being used for formatting
    • summary
      Returns the zone (or offset) for the given date and options.  This
      is broken out into a separate function so that it can be overridden
      by timezone-aware code.
    • type
      Function
  • dojo.date.locale.format

    • parameters:
      • dateObject: (typeof Date)
        the date and/or time to be formatted.  If a time only is formatted,
        the values in the year, month, and day fields are irrelevant.  The
        opposite is true when formatting only dates.
      • options: (typeof dojo.date.locale.__FormatOptions)
    • returns
      String
    • summary
      Format a Date object as a String, using locale-specific settings.
    • description
      Create a string from a Date object using a known localized pattern.
      By default, this method formats both date and time from dateObject.
      Formatting patterns are chosen appropriate to the locale.  Different
      formatting lengths may be chosen, with "full" used by default.
      Custom patterns may be used or registered with translations using
      the dojo.date.locale.addCustomFormats method.
      Formatting patterns are implemented using [the syntax described at
      unicode.org](http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns)
    • type
      Function
  • dojo.date.locale.regexp

    • parameters:
      • options: (typeof dojo.date.locale.__FormatOptions)
    • returns
      String
    • summary
      Builds the regular needed to parse a localized date
    • type
      Function
  • dojo.date.locale._parseInfo

    • parameters:
      • options: (typeof dojo.date.locale.__FormatOptions)
    • type
      Function
  • dojo.date.locale.parse

    • parameters:
      • value: (typeof String)
        A string representation of a date
      • options: (typeof dojo.date.locale.__FormatOptions)
    • returns
      null|Date
    • summary
      Convert a properly formatted string to a primitive Date object,
      using locale-specific settings.
    • description
      Create a Date object from a string using a known localized pattern.
      By default, this method parses looking for both date and time in the string.
      Formatting patterns are chosen appropriate to the locale.  Different
      formatting lengths may be chosen, with "full" used by default.
      Custom patterns may be used or registered with translations using
      the dojo.date.locale.addCustomFormats method.
      
      Formatting patterns are implemented using [the syntax described at
      unicode.org](http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns)
      When two digit years are used, a century is chosen according to a sliding
      window of 80 years before and 20 years after present year, for both `yy` and `yyyy` patterns.
      year < 100CE requires strict mode.
    • type
      Function
  • dojo.date.locale.addCustomFormats

    • parameters:
      • packageName: (typeof String)
      • bundleName: (typeof String)
    • summary
      Add a reference to a bundle containing localized custom formats to be
      used by date/time formatting and parsing routines.
    • description
      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`
      The pattern string should match the format used by the CLDR.
      See dojo.date.locale.format() for details.
      The resources must be loaded by dojo.requireLocalization() prior to use
    • type
      Function
  • dojo.date.locale._getGregorianBundle

    • parameters:
      • locale: (typeof String)
    • type
      Function
  • dojo.date.locale.getNames

    • parameters:
      • item: (typeof String)
        'months' || 'days'
      • type: (typeof String)
        'wide' || 'narrow' || 'abbr' (e.g. &quot;Monday&quot;, &quot;Mon&quot;, or &quot;M&quot; respectively, in English)
      • context: (typeof String)
        'standAlone' || 'format' (default)
      • locale: (typeof String)
        override locale used to find the names
    • summary
      Used to get localized strings from dojo.cldr for day or month names.
    • type
      Function
  • dojo.date.locale.isWeekend

    • parameters:
      • dateObject: (typeof Date)
      • locale: (typeof String)
    • returns
      Boolean
    • summary
      Determines if the date falls on a weekend, according to local custom.
    • type
      Function
  • dojo.date.locale._getDayOfYear

    • parameters:
      • dateObject: (typeof Date)
    • returns
      Number
    • summary
      gets the day of the year as represented by dateObject
    • type
      Function
  • dojo.date.locale._getWeekOfYear

    • parameters:
      • dateObject: (typeof Date)
      • firstDayOfWeek: (typeof Number)
    • returns
      Number
    • type
      Function
  • dojo.date.locale

    • type
      Object
  • dojo.date

    • type
      Object
  • dojo

    • type
      Object