From b025f5ea3b560b9c66625a9f3112b26d48611b94 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 30 Aug 2011 14:42:40 -0700 Subject: A few tweeks to the schedule class since lunch --- htdocs/src/ModerationSchedule.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'htdocs/src/ModerationSchedule.inc.php') 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() { -- cgit v1.2.3