MastodonHelp/web/lib/fnum.php

12 lines
353 B
PHP
Raw Normal View History

2023-12-26 11:16:24 +01:00
<?php
2023-12-28 12:25:43 +01:00
/*
$lc must be a variable that was set using the localeconv() function.
The locale must be correctly set with setlocale to an actually available
locale before using localeconv() and this function.
*/
function fnum($num,$lc,$dec=0) {
if (is_null($num)) return null;
return number_format($num,$dec,$lc['decimal_point'],$lc['thousands_sep']);
2023-12-26 11:16:24 +01:00
}
?>