summaryrefslogtreecommitdiff
path: root/htdocs/src/ModerationSchedule.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/src/ModerationSchedule.inc.php')
-rw-r--r--htdocs/src/ModerationSchedule.inc.php11
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() {