18 public function toSlot($epoch, $slotsize)
20 $dsttime = $this->
getDST($epoch) + $epoch;
21 $parsed = getdate($dsttime);
22 $slot = (($parsed[
'year'] - 2000) * 12) + $parsed[
'mon'] - 1;
28 $month = ($slot % 12);
29 $year = 2000 + floor($slot / 12);
30 return mktime(0, 0, 0, $month + 1, 1, $year);
35 $month = (
$from % 12) + 1;
36 $year = 2000 + floor(
$from / 12);
37 return $year .
'-' . $month;
An exception for terminatinating execution or to throw for unit testing.
__construct($offset)
Constructor.
toSlot($epoch, $slotsize)
prettyHeader($from, $to, $slotsize, $dateformat)
fromSlot($slot, $slotsize)