Include degree symbol in temperature unit

This commit is contained in:
bergware
2023-12-02 17:57:13 +01:00
parent 161d5f1481
commit d26895204e
+2 -2
View File
@@ -49,9 +49,9 @@ function my_time($time, $fmt=NULL) {
}
function my_temp($value) {
global $display;
$unit = _var($display,'unit','C');
$unit = _var($display,'unit');
$number = _var($display,'number','.,');
return is_numeric($value) ? (($unit=='F' ? fahrenheit($value) : str_replace('.', $number[0], $value))." $unit") : $value;
return is_numeric($value) ? (($unit=='F' ? fahrenheit($value) : str_replace('.', $number[0], $value)).' '.strtr($unit,['C'=>'℃','F'=>'℉'])) : $value;
}
function my_disk($name, $raw=false) {
global $display;