Include degree symbol in temperature unit

This commit is contained in:
bergware
2023-12-02 19:21:37 +01:00
parent 1e82d109c4
commit 697b91704a

View File

@@ -51,7 +51,7 @@ function my_temp($value) {
global $display;
$unit = _var($display,'unit');
$number = _var($display,'number','.,');
return is_numeric($value) ? (($unit=='F' ? fahrenheit($value) : str_replace('.', $number[0], $value)).' '.strtr($unit,['C'=>'℃','F'=>'℉'])) : $value;
return is_numeric($value) ? (($unit=='F' ? fahrenheit($value) : str_replace('.', $number[0], $value)).' °'.$unit) : $value;
}
function my_disk($name, $raw=false) {
global $display;