mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
Buss-und-bettag fix
git-svn-id: https://svn.fhem.de/fhem/trunk@2157 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7a595e0a2f
commit
b98b93df8d
@ -132,7 +132,7 @@ holiday_refresh($$)
|
|||||||
|
|
||||||
} elsif($l =~ m/^5/) { # nth weekday since MM-DD / before MM-DD
|
} elsif($l =~ m/^5/) { # nth weekday since MM-DD / before MM-DD
|
||||||
my @a = split(" +", $l, 6);
|
my @a = split(" +", $l, 6);
|
||||||
# arguments: 5 <distance> <weekday> <day> <month> <name>
|
# arguments: 5 <distance> <weekday> <month> <day> <name>
|
||||||
my %wd = ("Sun"=>0, "Mon"=>1, "Tue"=>2, "Wed"=>3,
|
my %wd = ("Sun"=>0, "Mon"=>1, "Tue"=>2, "Wed"=>3,
|
||||||
"Thu"=>4, "Fri"=>5, "Sat"=>6);
|
"Thu"=>4, "Fri"=>5, "Sat"=>6);
|
||||||
my $wd = $wd{$a[2]};
|
my $wd = $wd{$a[2]};
|
||||||
@ -144,7 +144,7 @@ holiday_refresh($$)
|
|||||||
my $yday=$fd[7];
|
my $yday=$fd[7];
|
||||||
# create time object of target date - mktime counts months and their
|
# create time object of target date - mktime counts months and their
|
||||||
# days from 0 instead of 1, so subtract 1 from each
|
# days from 0 instead of 1, so subtract 1 from each
|
||||||
my $tgt=mktime(0,0,1,$a[3]-1,$a[4]-1,$fd[5],0,0,-1);
|
my $tgt=mktime(0,0,1,$a[4]-1,$a[3]-1,$fd[5],0,0,-1);
|
||||||
my $tgtmin=$tgt;
|
my $tgtmin=$tgt;
|
||||||
my $tgtmax=$tgt;
|
my $tgtmax=$tgt;
|
||||||
my $weeksecs=7*24*60*60; # 7 days, 24 hours, 60 minutes, 60seconds each
|
my $weeksecs=7*24*60*60; # 7 days, 24 hours, 60 minutes, 60seconds each
|
||||||
|
Loading…
Reference in New Issue
Block a user