/** * Handle the parse request. * * @return array */ public function format() { $day = self::dayLookup[$this->date[1]]; $month = self::monthLookup[$this->date[0]]; if (is_array($month)) { $month = isJewishLeapYear($this->date[2]) ? $month[1] : $month[0]; } $year = $this->numerology->toHebrewYear($this->date[2]); return [$day, $month, $year]; }
/** * @test * @expectedException InvalidArgumentException */ public function it_should_throw_an_exception_if_the_input_isnt_a_number() { $this->numerology->toHebrewYear('התשעו'); }