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/currency.js

  • Provides:

    • dojo.currency
  • Requires:

    • dojo.number in common
    • dojo.i18n in common
    • dojo.cldr.monetary in common
  • dojo.currency.__FormatOptions

    • type
      Function
    • chains:
      • dojo.number.__FormatOptions: (prototype)
      • dojo.number.__FormatOptions: (call)
  • dojo.currency.__FormatOptions.type

    • optional
    • type
      String
    • summary
      Should not be set.  Value is assumed to be "currency".
  • dojo.currency.__FormatOptions.symbol

    • optional
    • type
      String
    • summary
      localized currency symbol. The default will be looked up in table of supported currencies in <code>dojo.cldr</code>
      A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
  • dojo.currency.__FormatOptions.currency

    • optional
    • type
      String
    • summary
      an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like &quot;USD&quot;.
      For use with dojo.currency only.
  • dojo.currency.__FormatOptions.places

    • optional
    • type
      Number
    • summary
      number of decimal places to show.  Default is defined based on which currency is used.
  • dojo.currency.__ParseOptions

    • type
      Function
    • chains:
      • dojo.number.__ParseOptions: (prototype)
      • dojo.number.__ParseOptions: (call)
  • dojo.currency.__ParseOptions.type

    • optional
    • type
      String
    • summary
      Should not be set.  Value is assumed to be currency.
  • dojo.currency.__ParseOptions.currency

    • optional
    • type
      String
    • summary
      an [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like &quot;USD&quot;.
      For use with dojo.currency only.
  • dojo.currency.__ParseOptions.symbol

    • optional
    • type
      String
    • summary
      localized currency symbol. The default will be looked up in table of supported currencies in <code>dojo.cldr</code>
      A [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code will be used if not found.
  • dojo.currency.__ParseOptions.places

    • optional
    • type
      Number
    • summary
      fixed number of decimal places to accept.  The default is determined based on which currency is used.
  • dojo.currency.__ParseOptions.fractional

    • optional
    • type
      Boolean|Array
    • summary
      Whether to include the fractional portion, where the number of decimal places are implied by the currency
      or explicit 'places' parameter.  The value [true,false] makes the fractional portion optional.
      By default for currencies, it the fractional portion is optional.
  • dojo.currency

    • summary
      localized formatting and parsing routines for currencies
    • description
      extends dojo.number to provide culturally-appropriate formatting of values
      in various world currencies, including use of a currency symbol.  The currencies are specified
      by a three-letter international symbol in all uppercase, and support for the currencies is
      provided by the data in `dojo.cldr`.  The scripts generating dojo.cldr specify which
      currency support is included.  A fixed number of decimal places is determined based
      on the currency type and is not determined by the 'pattern' argument.  The fractional
      portion is optional, by default, and variable length decimals are not supported.
    • type
      Object
  • dojo.currency._mixInDefaults

    • parameters:
      • options
    • type
      Function
  • dojo.currency.format

    • parameters:
      • value: (typeof Number)
        the number to be formatted.
      • options: (typeof dojo.currency.__FormatOptions)
    • summary
      Format a Number as a currency, using locale-specific settings
    • description
      Create a string from a Number using a known, localized pattern.
      [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Elements)
      appropriate to the locale are chosen from the [CLDR](http://unicode.org/cldr)
      as well as the appropriate symbols and delimiters and number of decimal places.
    • type
      Function
  • dojo.currency.regexp

    • parameters:
      • options: (typeof dojo.number.__RegexpOptions)
    • returns
      String
    • summary
      Builds the regular needed to parse a currency value
    • description
      Returns regular expression with positive and negative match, group and decimal separators
      Note: the options.places default, the number of decimal places to accept, is defined by the currency type.
    • type
      Function
  • dojo.currency.parse

    • parameters:
      • expression: (typeof String)
        A string representation of a currency value
      • options: (typeof dojo.currency.__ParseOptions)
    • summary
      Convert a properly formatted currency string to a primitive Number,
      using locale-specific settings.
    • description
      Create a Number from a string using a known, localized pattern.
      [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Format_Patterns)
      are chosen appropriate to the locale, as well as the appropriate symbols and delimiters
      and number of decimal places.
    • type
      Function
  • dojo

    • type
      Object