2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-17 23:46:03 +00:00

57_CALVIEW.pm: -new function age calculation

-new reading for description of terms


git-svn-id: https://svn.fhem.de/fhem/trunk@12901 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
chris1284 2016-12-28 17:43:04 +00:00
parent 9e41bc00b5
commit 6481da192a

View File

@ -136,7 +136,7 @@ sub CALVIEW_GetUpdate($){
@termyear = split(/\./,$termin->{bdate});
if($yobfield eq "_location" && length($termin->{location}) > 0 && $termin->{location}=~ /^\d+$/ ) { $age = $termyear[2] - ($termin->{location});}
elsif($yobfield eq "_description" && length($termin->{description}) > 0 && $termin->{description}=~ /^\d+$/) { $age = $termyear[2] - ($termin->{description});}
else {$age = "no calculation passible"}
else {$age = " "}
}
#standard reading t_[3steliger counter] anlegen
if($isbday == 1 ){ readingsBulkUpdate($hash, "t_".sprintf ('%03d', $counter)."_age", $age);}