/** * @dataProvider providerDayOfYear * * @param integer $year The year. * @param integer $month The expected month. * @param integer $day The expected day. * @param integer $dayOfYear The day-of-year. */ public function testOfYearDay($year, $month, $day, $dayOfYear) { $this->assertLocalDateIs($year, $month, $day, LocalDate::ofYearDay($year, $dayOfYear)); }
/** * Combines this year with a day-of-year to create a LocalDate. * * @param integer $dayOfYear The day-of-year to use, from 1 to 366. * * @return LocalDate * * @throws DateTimeException If the day-of-year is invalid for this year. */ public function atDay($dayOfYear) { return LocalDate::ofYearDay($this->year, $dayOfYear); }