Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 57 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Number:: (4 methods):
  __construct()
  setThousandsSeparator()
  getLocaleFormat()
  format()


Class: Number  - X-Ref

__construct(int $decimals = 2,bool $thousandsSeparator = self::WITH_THOUSANDS_SEPARATOR,?string $locale = null)   X-Ref

param: int $decimals number of decimal places to display, in the range 0-30
param: bool $thousandsSeparator indicator whether the thousands separator should be used, or not
param: ?string $locale Set the locale for the number format; or leave as the default null.

setThousandsSeparator(bool $thousandsSeparator = self::WITH_THOUSANDS_SEPARATOR)   X-Ref
No description

getLocaleFormat()   X-Ref
As MS Excel cannot easily handle Lakh, which is the only locale-specific Number format variant,
we don't use locale with Numbers.


format()   X-Ref
No description