mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
UConv: fix alg sign
git-svn-id: https://svn.fhem.de/fhem/trunk@19649 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f7d1c1f26a
commit
0d17346085
@ -2090,11 +2090,13 @@ sub _GetSeasonPheno ($$;$$) {
|
||||
# HELPER FUNCTIONS
|
||||
|
||||
sub decimal_mark ($;$) {
|
||||
my $s;
|
||||
my $i;
|
||||
my $f;
|
||||
if ( $_[0] =~ /^(\d+)(?:\.(\d+))?$/ ) {
|
||||
$i = reverse $1;
|
||||
$f = $2;
|
||||
if ( $_[0] =~ /^(\-|\+)?(\d+)(?:\.(\d+))?$/ ) {
|
||||
$s = $1;
|
||||
$i = reverse $2;
|
||||
$f = $3;
|
||||
}
|
||||
else {
|
||||
return $_[0];
|
||||
@ -2122,7 +2124,7 @@ sub decimal_mark ($;$) {
|
||||
$f =~ s/(\d{$grouping[0]})(?=\d)/$1$thousands_sep/g
|
||||
if ( defined($f) && $f ne '' );
|
||||
|
||||
return (reverse $i)
|
||||
return ( $s ? $s : '' ) . ( reverse $i )
|
||||
. ( defined($f) && $f ne '' ? $decimal_point . $f : '' );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user