public function subMonth($n) { if ($n === 0) { return clone $this; } $ts = $this->timestamp; $result = mktime(date('H', $ts), date('i', $ts), date('s', $ts), date('n', $ts) - $n, 1, date('Y', $ts)); return new Date($result, $this->timezone); }