public function dayOfYear()
    {
        $k = $this->isLeapYear() ? 1 : 2;
        $n = intval(275 * (int)$this->month / 9) -
          $k * intval(((int)$this->month + 9) / 12) +
          (int)$this->day - 30;

        return (int)$n;
    }