projects
/
tpope-extra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56bd305
)
Tweaked next_class
author
Tim Pope
<code@tpope.net>
Fri, 10 Sep 2004 02:30:04 +0000
(
02:30
+0000)
committer
Tim Pope
<code@tpope.net>
Fri, 10 Sep 2004 02:30:04 +0000
(
02:30
+0000)
perl/sctweb
patch
|
blob
|
history
diff --git
a/perl/sctweb
b/perl/sctweb
index 1fa76cbbc3019ab9bd5765a770df66eaeb5a3cee..d9f9eff52a9ccff739a8a20fc629455ad909d61b 100755
(executable)
--- a/
perl/sctweb
+++ b/
perl/sctweb
@@
-56,7
+56,7
@@
sub next_class {
my $days = Delta_Days($1,$2,$3,$4,$5,$6);
my $firstday = Date::Calc->new($1,$2,$3);
my $lastday = Date::Calc->new($4,$5,$6);
my $days = Delta_Days($1,$2,$3,$4,$5,$6);
my $firstday = Date::Calc->new($1,$2,$3);
my $lastday = Date::Calc->new($4,$5,$6);
- my $today = Date::Calc->
today
;
+ my $today = Date::Calc->
new(Date::Calc->localtime(time+3600*6)->date)
;
my @days=();
foreach(split(" ",$class{'days'})) {
push @days, Decode_Day_of_Week($_);
my @days=();
foreach(split(" ",$class{'days'})) {
push @days, Decode_Day_of_Week($_);
@@
-67,7
+67,7
@@
sub next_class {
next if(grep($_ == $today, @off));
return $today;
}
next if(grep($_ == $today, @off));
return $today;
}
- $today = Date::Calc->
today
;
+ $today = Date::Calc->
new(Date::Calc->gmtime->date)
;
for($today = ($today < $lastday ? $today : $lastday); $today > $firstday; $today--) {
next unless(grep($_ == Day_of_Week($today->date), @days));
next if(grep($_ == $today, @off));
for($today = ($today < $lastday ? $today : $lastday); $today > $firstday; $today--) {
next unless(grep($_ == Day_of_Week($today->date), @days));
next if(grep($_ == $today, @off));