FHEM/95_holiday.pm: Remove warning, filter double entries (Forum #101815)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19729 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-06-28 09:50:49 +00:00
parent d905edcff3
commit 7dbd35c822

View File

@ -59,7 +59,7 @@ holiday_refresh($;$$)
$fordate = sprintf("%02d-%02d", $lt[4]+1, $lt[3]);
@fd = @lt;
} else {
$fordate !~ m/^((\d{4})-)?([01]\d)-([0-3]\d)$/; # fmt is already checked
$fordate =~ m/^((\d{4})-)?([01]\d)-([0-3]\d)$/; # fmt is already checked
my ($m,$d) = ($3,$4);
$fordate = "$m-$d";
$lt[5] = $2-1900 if($2);
@ -216,7 +216,7 @@ holiday_refresh($;$$)
$found = $args[3];
}
}
push @foundList, $found if($found);
push @foundList, $found if($found && !grep(m/^$found$/,@foundList));
}