Plugins/Weather.pm: fix temps

This commit is contained in:
Pragmatic Software 2020-01-26 06:01:45 -08:00
parent 8c9087c57e
commit 6547acc2f0
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ sub get_weather {
sub fix_temps {
my ($self, $text) = @_;
$text =~ s|(\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg;
$text =~ s|(-?\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg;
return $text;
}