diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-08-30 14:42:40 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2017-09-04 11:16:53 -0700 |
commit | b025f5ea3b560b9c66625a9f3112b26d48611b94 (patch) | |
tree | 56ffb460ea93af361e244f68a2d5fa365b0eac98 /htdocs/src | |
parent | e121bbebe3ccd990b66a7b04289adf481a4aa2af (diff) |
A few tweeks to the schedule class since lunch
Diffstat (limited to 'htdocs/src')
-rw-r--r-- | htdocs/src/ModerationSchedule.inc.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/htdocs/src/ModerationSchedule.inc.php b/htdocs/src/ModerationSchedule.inc.php index cca6697..4f5c6db 100644 --- a/htdocs/src/ModerationSchedule.inc.php +++ b/htdocs/src/ModerationSchedule.inc.php @@ -70,11 +70,18 @@ class ModerationSchedule implements Iterator { } public function key() { - // TODO: Return "key" for "current" moderator (date) + return strtotime($this->year . 'W' . + ($this->week < 10 ? '0' : '') . $this->week); } public function next() { - // TODO: Impl. next + if ($this->week == 53) { + $this->week = 1; + $this->year++; + + } else { + $this->week++; + } } public function valid() { |