public static function init() { self::$MIN = LocalDateTime::ofDateAndTime(LocalDate::MIN(), LocalTime::MIN()); self::$MAX = LocalDateTime::ofDateAndTime(LocalDate::MAX(), LocalTime::MAX()); }
public function test_periodUntil_LocalDate_max() { $years = Math::toIntExact(Year::MAX_VALUE - Year::MIN_VALUE); $this->assertEquals(LocalDate::MIN()->untilDate(LocalDate::MAX()), Period::of($years, 11, 30)); }
/** * @dataProvider data_samples */ public function test_samples_set(TemporalField $field, LocalDate $date, $value) { $this->assertEquals($field->adjustInto(LocalDate::MAX(), $value), $date); $this->assertEquals($field->adjustInto(LocalDate::MIN(), $value), $date); $this->assertEquals($field->adjustInto(self::JAN01_1970(), $value), $date); $this->assertEquals($field->adjustInto(self::DEC31_1969(), $value), $date); $this->assertEquals($field->adjustInto(self::NOV12_1945(), $value), $date); }