dojox/date/hebrew/locale (version 1.10)

See the dojox/date/hebrew/locale reference documentation for more information.

Method Summary

  • _getHebrewBundle(locale)
  • _parseInfo(options)
  • addCustomFormats(packageName,bundleName) Add a reference to a bundle containing localized custom formats to be used by date/time formatting and parsing routines.
  • format(dateObject,options) Format a Date object as a String, using settings.
  • getNames(item,type,context,locale,date) Used to get localized strings from dojo.cldr for day or month names.
  • parse(value,options) This function parse string date value according to options
  • regexp(options) Builds the regular needed to parse a hebrew.Date

Methods

_getHebrewBundle(locale)
Parameter Type Description
locale String
_parseInfo(options)
Parameter Type Description
options oblect
Optional
addCustomFormats(packageName,bundleName)

Add 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 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

Parameter Type Description
packageName String
bundleName String
format(dateObject,options)

Format a Date object as a String, using settings.

Create a string from a hebrew.Date object using a known pattern. By default, this method formats both date and time from dateObject. Default formatting lengths is 'short'

Parameter Type Description
dateObject dojox/date/hebrewDate

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 object
Optional
getNames(item,type,context,locale,date)

Used to get localized strings from dojo.cldr for day or month names.

Parameter Type Description
item String

'months' || 'days'

type String

'wide' || 'narrow' || 'abbr' (e.g. "Monday", "Mon", or "M" respectively, in English)

context String
Optional
locale String
Optional

override locale used to find the names

date dojox/date/hebrew/Date
Optional

required for item=months to determine leap month name

parse(value,options)

This function parse string date value according to options

Parameter Type Description
value String
options Object
Optional

Examples

Example 1

var dateHebrew = dojox.date.hebrew.locale.parse('11/10/5740', {datePattern:'dd/MM/yy', selector:'date'});
in Hebrew locale string for parsing contains Hebrew Numerals

  options = {datePattern:'dd MMMM yy', selector:'date'};

   y - year
   M, MM  - short month
  MMM, MMMM - long month
  d - date
  a - am, pm
   E, EE, EEE, EEEE  - week day

    h, H, k, K, m, s, S,  -  time format
regexp(options)

Builds the regular needed to parse a hebrew.Date

Parameter Type Description
options object
Optional
Error in the documentation? Can’t find what you are looking for? Let us know!