diff --git a/src/PhpSpreadsheet/Calculation/Financial/Dollar.php b/src/PhpSpreadsheet/Calculation/Financial/Dollar.php index e6a0392a..7bebb391 100644 --- a/src/PhpSpreadsheet/Calculation/Financial/Dollar.php +++ b/src/PhpSpreadsheet/Calculation/Financial/Dollar.php @@ -7,6 +7,17 @@ use PhpOffice\PhpSpreadsheet\Calculation\TextData\Format; class Dollar { + /** + * DOLLAR. + * + * This function converts a number to text using currency format, with the decimals rounded to the specified place. + * The format used is $#,##0.00_);($#,##0.00).. + * + * @param mixed $number The value to format + * @param mixed $precision The number of digits to display to the right of the decimal point (as an integer). + * If precision is negative, number is rounded to the left of the decimal point. + * If you omit precision, it is assumed to be 2 + */ public static function format($number, $precision = 2): string { return Format::DOLLAR($number, $precision);