= Number Format Conversions

== Conversion between formatted decimals

* `apoc.number.format(number)` format a long or double using the default system pattern and language to produce a string
* `apoc.number.format(number, pattern)` format a long or double using a pattern and the default system language to produce a string
* `apoc.number.format(number, lang)` format a long or double using the default system pattern pattern and a language to produce a string
* `apoc.number.format(number, pattern, lang)` format a long or double using a pattern and a language to produce a string

* `apoc.number.parseInt(text)` parse a text using the default system pattern and language to produce a long
* `apoc.number.parseInt(text, pattern)` parse a text using a pattern and the default system language to produce a long
* `apoc.number.parseInt(text, '', lang)` parse a text using the default system pattern and a language to produce a long
* `apoc.number.parseInt(text, pattern, lang)` parse a text using a pattern and a language to produce a long

* `apoc.number.parseFloat(text)` parse a text using the default system pattern and language to produce a double
* `apoc.number.parseFloat(text, pattern)` parse a text using a pattern and the default system language to produce a double
* `apoc.number.parseFloat(text,'',lang)` parse a text using the default system pattern and a language to produce a double
* `apoc.number.parseFloat(text, pattern, lang)` parse a text using a pattern and a language to produce a double

* The full list of supported values for `pattern` and `lang` params is described in https://docs.oracle.com/javase/9/docs/api/java/text/DecimalFormat.html[DecimalFormat JavaDoc]

== Examples

....
  return apoc.number.format(12345.67) as value

  ╒═════════╕
  │value    │
  ╞═════════╡
  │12,345.67│
  └─────────┘
....

....
  return apoc.number.format(12345, '#,##0.00;(#,##0.00)', 'it') as value

  ╒═════════╕
  │value    │
  ╞═════════╡
  │12.345,00│
  └─────────
....

....
  return apoc.number.format(12345.67, '#,##0.00;(#,##0.00)', 'it') as value

  ╒═════════╕
  │value    │
  ╞═════════╡
  │12.345,67│
  └─────────┘
....

....
  return apoc.number.parseInt('12.345', '#,##0.00;(#,##0.00)', 'it') as value

  ╒═════╕
  │value│
  ╞═════╡
  │12345│
  └─────┘
....

....
  return apoc.number.parseFloat('12.345,67', '#,##0.00;(#,##0.00)', 'it') as value

  ╒════════╕
  │value   │
  ╞════════╡
  │12345.67│
  └────────┘
....

....
  return apoc.number.format('aaa') as value

  null beacuse 'aaa' isn't a number
....

....
  RETURN apoc.number.parseInt('aaa')
  
  Return null because 'aaa' is unparsable.
....
