public function range(ChronoField $field)
 {
     switch ($field) {
         case CF::PROLEPTIC_MONTH():
             $range = CF::PROLEPTIC_MONTH()->range();
             return ValueRange::of($range->getMinimum() + self::YEARS_DIFFERENCE * 12, $range->getMaximum() + self::YEARS_DIFFERENCE * 12);
         case CF::YEAR_OF_ERA():
             $range = CF::YEAR()->range();
             return ValueRange::ofVariable(1, -($range->getMinimum() + self::YEARS_DIFFERENCE) + 1, $range->getMaximum() + self::YEARS_DIFFERENCE);
         case CF::YEAR():
             $range = CF::YEAR()->range();
             return ValueRange::of($range->getMinimum() + self::YEARS_DIFFERENCE, $range->getMaximum() + self::YEARS_DIFFERENCE);
     }
     return $field->range();
 }
 public function test_isSupported_TemporalField()
 {
     // TODO $this->assertEquals($this->TEST_DATE_TIME->isSupported(null), false);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::NANO_OF_SECOND()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::NANO_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MICRO_OF_SECOND()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MICRO_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MILLI_OF_SECOND()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MILLI_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::SECOND_OF_MINUTE()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::SECOND_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MINUTE_OF_HOUR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MINUTE_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::HOUR_OF_AMPM()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::CLOCK_HOUR_OF_AMPM()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::HOUR_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::CLOCK_HOUR_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::AMPM_OF_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::DAY_OF_WEEK()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::ALIGNED_DAY_OF_WEEK_IN_MONTH()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::ALIGNED_DAY_OF_WEEK_IN_YEAR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::DAY_OF_MONTH()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::DAY_OF_YEAR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::EPOCH_DAY()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::ALIGNED_WEEK_OF_MONTH()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::ALIGNED_WEEK_OF_YEAR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::MONTH_OF_YEAR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::PROLEPTIC_MONTH()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::YEAR()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::YEAR_OF_ERA()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::ERA()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::INSTANT_SECONDS()), true);
     $this->assertEquals($this->TEST_DATE_TIME->isSupported(CF::OFFSET_SECONDS()), true);
 }
예제 #3
0
 /**
  * Returns a copy of this date with the specified field set to a new value.
  * <p>
  * This returns a {@code LocalDate}, based on this one, with the value
  * for the specified field changed.
  * This can be used to change any supported field, such as the year, month or day-of-month.
  * If it is not possible to set the value, because the field is not supported or for
  * some other reason, an exception is thrown.
  * <p>
  * In some cases, changing the specified field can cause the resulting date to become invalid,
  * such as changing the month from 31st January to February would make the day-of-month invalid.
  * In cases like this, the field is responsible for resolving the date. Typically it will choose
  * the previous valid date, which would be the last valid day of February in this example.
  * <p>
  * If the field is a {@link ChronoField} then the adjustment is implemented here.
  * The supported fields behave as follows:
  * <ul>
  * <li>{@code DAY_OF_WEEK} -
  *  Returns a {@code LocalDate} with the specified day-of-week.
  *  The date is adjusted up to 6 days forward or backward within the boundary
  *  of a Monday to Sunday week.
  * <li>{@code ALIGNED_DAY_OF_WEEK_IN_MONTH} -
  *  Returns a {@code LocalDate} with the specified aligned-day-of-week.
  *  The date is adjusted to the specified month-based aligned-day-of-week.
  *  Aligned weeks are counted such that the first week of a given month starts
  *  on the first day of that month.
  *  This may cause the date to be moved up to 6 days into the following month.
  * <li>{@code ALIGNED_DAY_OF_WEEK_IN_YEAR} -
  *  Returns a {@code LocalDate} with the specified aligned-day-of-week.
  *  The date is adjusted to the specified year-based aligned-day-of-week.
  *  Aligned weeks are counted such that the first week of a given year starts
  *  on the first day of that year.
  *  This may cause the date to be moved up to 6 days into the following year.
  * <li>{@code DAY_OF_MONTH} -
  *  Returns a {@code LocalDate} with the specified day-of-month.
  *  The month and year will be unchanged. If the day-of-month is invalid for the
  *  year and month, then a {@code DateTimeException} is thrown.
  * <li>{@code DAY_OF_YEAR} -
  *  Returns a {@code LocalDate} with the specified day-of-year.
  *  The year will be unchanged. If the day-of-year is invalid for the
  *  year, then a {@code DateTimeException} is thrown.
  * <li>{@code EPOCH_DAY} -
  *  Returns a {@code LocalDate} with the specified epoch-day.
  *  This completely replaces the date and is equivalent to {@link #ofEpochDay(long)}.
  * <li>{@code ALIGNED_WEEK_OF_MONTH} -
  *  Returns a {@code LocalDate} with the specified aligned-week-of-month.
  *  Aligned weeks are counted such that the first week of a given month starts
  *  on the first day of that month.
  *  This adjustment moves the date in whole week chunks to match the specified week.
  *  The result will have the same day-of-week as this date.
  *  This may cause the date to be moved into the following month.
  * <li>{@code ALIGNED_WEEK_OF_YEAR} -
  *  Returns a {@code LocalDate} with the specified aligned-week-of-year.
  *  Aligned weeks are counted such that the first week of a given year starts
  *  on the first day of that year.
  *  This adjustment moves the date in whole week chunks to match the specified week.
  *  The result will have the same day-of-week as this date.
  *  This may cause the date to be moved into the following year.
  * <li>{@code MONTH_OF_YEAR} -
  *  Returns a {@code LocalDate} with the specified month-of-year.
  *  The year will be unchanged. The day-of-month will also be unchanged,
  *  unless it would be invalid for the new month and year. In that case, the
  *  day-of-month is adjusted to the maximum valid value for the new month and year.
  * <li>{@code PROLEPTIC_MONTH} -
  *  Returns a {@code LocalDate} with the specified proleptic-month.
  *  The day-of-month will be unchanged, unless it would be invalid for the new month
  *  and year. In that case, the day-of-month is adjusted to the maximum valid value
  *  for the new month and year.
  * <li>{@code YEAR_OF_ERA} -
  *  Returns a {@code LocalDate} with the specified year-of-era.
  *  The era and month will be unchanged. The day-of-month will also be unchanged,
  *  unless it would be invalid for the new month and year. In that case, the
  *  day-of-month is adjusted to the maximum valid value for the new month and year.
  * <li>{@code YEAR} -
  *  Returns a {@code LocalDate} with the specified year.
  *  The month will be unchanged. The day-of-month will also be unchanged,
  *  unless it would be invalid for the new month and year. In that case, the
  *  day-of-month is adjusted to the maximum valid value for the new month and year.
  * <li>{@code ERA} -
  *  Returns a {@code LocalDate} with the specified era.
  *  The year-of-era and month will be unchanged. The day-of-month will also be unchanged,
  *  unless it would be invalid for the new month and year. In that case, the
  *  day-of-month is adjusted to the maximum valid value for the new month and year.
  * </ul>
  * <p>
  * In all cases, if the new value is outside the valid range of values for the field
  * then a {@code DateTimeException} will be thrown.
  * <p>
  * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
  * <p>
  * If the field is not a {@code ChronoField}, then the result of this method
  * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}
  * passing {@code this} as the argument. In this case, the field determines
  * whether and how to adjust the instant.
  * <p>
  * This instance is immutable and unaffected by this method call.
  *
  * @param TemporalField $field the field to set in the result, not null
  * @param int $newValue the new value of the field in the result
  * @return LocalDate a {@code LocalDate} based on {@code this} with the specified field set, not null
  * @throws DateTimeException if the field cannot be set
  * @throws UnsupportedTemporalTypeException if the field is not supported
  * @throws ArithmeticException if numeric overflow occurs
  */
 public function with(TemporalField $field, $newValue)
 {
     if ($field instanceof ChronoField) {
         /** @var Chronofield $f */
         $f = $field;
         $f->checkValidValue($newValue);
         switch ($f) {
             case ChronoField::DAY_OF_WEEK():
                 return $this->plusDays($newValue - $this->getDayOfWeek()->getValue());
             case ChronoField::ALIGNED_DAY_OF_WEEK_IN_MONTH():
                 return $this->plusDays($newValue - $this->getLong(ChronoField::ALIGNED_DAY_OF_WEEK_IN_MONTH()));
             case ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR():
                 return $this->plusDays($newValue - $this->getLong(ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR()));
             case ChronoField::DAY_OF_MONTH():
                 return $this->withDayOfMonth((int) $newValue);
             case ChronoField::DAY_OF_YEAR():
                 return $this->withDayOfYear((int) $newValue);
             case ChronoField::EPOCH_DAY():
                 return LocalDate::ofEpochDay($newValue);
             case ChronoField::ALIGNED_WEEK_OF_MONTH():
                 return $this->plusWeeks($newValue - $this->getLong(ChronoField::ALIGNED_WEEK_OF_MONTH()));
             case ChronoField::ALIGNED_WEEK_OF_YEAR():
                 return $this->plusWeeks($newValue - $this->getLong(ChronoField::ALIGNED_WEEK_OF_YEAR()));
             case ChronoField::MONTH_OF_YEAR():
                 return $this->withMonth((int) $newValue);
             case ChronoField::PROLEPTIC_MONTH():
                 return $this->plusMonths($newValue - $this->getProlepticMonth());
             case ChronoField::YEAR_OF_ERA():
                 return $this->withYear((int) ($this->year >= 1 ? $newValue : 1 - $newValue));
             case ChronoField::YEAR():
                 return $this->withYear((int) $newValue);
             case ChronoField::ERA():
                 return $this->getLong(ChronoField::ERA()) == $newValue ? $this : $this->withYear(1 - $this->year);
         }
         throw new UnsupportedTemporalTypeException("Unsupported field: " . $field);
     }
     return $field->adjustInto($this, $newValue);
 }
예제 #4
0
 public function test_getLong_TemporalField()
 {
     $this->assertEquals(self::TEST_2008_06()->getLong(CF::YEAR()), 2008);
     $this->assertEquals(self::TEST_2008_06()->getLong(CF::MONTH_OF_YEAR()), 6);
     $this->assertEquals(self::TEST_2008_06()->getLong(CF::YEAR_OF_ERA()), 2008);
     $this->assertEquals(self::TEST_2008_06()->getLong(CF::ERA()), 1);
     $this->assertEquals(self::TEST_2008_06()->getLong(CF::PROLEPTIC_MONTH()), 2008 * 12 + 6 - 1);
 }
예제 #5
0
 public function with(TemporalField $field, $newValue)
 {
     if ($field instanceof ChronoField) {
         $f = $field;
         if ($this->getLong($f) === $newValue) {
             return $this;
         }
         switch ($f) {
             case CF::PROLEPTIC_MONTH():
                 $this->getChronology()->range($f)->checkValidValue($newValue, $f);
                 return $this->plusMonths($newValue - $this->getProlepticMonth());
             case CF::YEAR_OF_ERA():
             case CF::YEAR():
             case ERA:
                 $nvalue = $this->getChronology()->range($f)->checkValidIntValue($newValue, $f);
                 switch ($f) {
                     case CF::YEAR_OF_ERA():
                         return $this->withDate($this->isoDate->withYear(($this->getProlepticYear() >= 1 ? $nvalue : 1 - $nvalue) - ThaiBuddhistChronology::YEARS_DIFFERENCE));
                     case CF::YEAR():
                         return $this->withDate($this->isoDate->withYear($nvalue - ThaiBuddhistChronology::YEARS_DIFFERENCE));
                     case ERA:
                         return $this->withDate($this->isoDate->withYear(1 - $this->getProlepticYear() - ThaiBuddhistChronology::YEARS_DIFFERENCE));
                 }
         }
         return $this->withDate($this->isoDate->with($field, $newValue));
     }
     return parent::with($field, $newValue);
 }
예제 #6
0
 protected function resolveProlepticMonth(FieldValues $fieldValues, ResolverStyle $resolverStyle)
 {
     $pMonth = $fieldValues->remove(CF::PROLEPTIC_MONTH());
     if ($pMonth !== null) {
         if ($resolverStyle != ResolverStyle::LENIENT()) {
             CF::PROLEPTIC_MONTH()->checkValidValue($pMonth);
         }
         $this->addFieldValue($fieldValues, CF::MONTH_OF_YEAR(), Math::floorMod($pMonth, 12) + 1);
         $this->addFieldValue($fieldValues, CF::YEAR(), Math::floorDiv($pMonth, 12));
     }
 }
예제 #7
0
 private function monthsUntil(ChronoLocalDate $end)
 {
     $range = $this->getChronology()->range(CF::MONTH_OF_YEAR());
     if ($range->getMaximum() !== 12) {
         throw new \AssertionError("ChronoLocalDateImpl only supports Chronologies with 12 months per year");
     }
     $packed1 = $this->getLong(CF::PROLEPTIC_MONTH()) * 32 + $this->get(CF::DAY_OF_MONTH());
     // no overflow
     $packed2 = $end->getLong(CF::PROLEPTIC_MONTH()) * 32 + $end->get(CF::DAY_OF_MONTH());
     // no overflow
     return ($packed2 - $packed1) / 32;
 }
예제 #8
0
 public function test_getLong_TemporalField()
 {
     $test = LocalDate::of(2008, 6, 30);
     $this->assertEquals($test->getLong(CF::YEAR()), 2008);
     $this->assertEquals($test->getLong(CF::MONTH_OF_YEAR()), 6);
     $this->assertEquals($test->getLong(CF::YEAR_OF_ERA()), 2008);
     $this->assertEquals($test->getLong(CF::ERA()), 1);
     $this->assertEquals($test->getLong(CF::PROLEPTIC_MONTH()), 2008 * 12 + 6 - 1);
     $this->assertEquals($test->getLong(CF::DAY_OF_MONTH()), 30);
     $this->assertEquals($test->getLong(CF::DAY_OF_WEEK()), 1);
     $this->assertEquals($test->getLong(CF::DAY_OF_YEAR()), 182);
 }
예제 #9
0
 function data_fieldBased()
 {
     return [[CF::DAY_OF_WEEK(), true, false], [CF::ALIGNED_DAY_OF_WEEK_IN_MONTH(), true, false], [CF::ALIGNED_DAY_OF_WEEK_IN_YEAR(), true, false], [CF::DAY_OF_MONTH(), true, false], [CF::DAY_OF_YEAR(), true, false], [CF::EPOCH_DAY(), true, false], [CF::ALIGNED_WEEK_OF_MONTH(), true, false], [CF::ALIGNED_WEEK_OF_YEAR(), true, false], [CF::MONTH_OF_YEAR(), true, false], [CF::PROLEPTIC_MONTH(), true, false], [CF::YEAR_OF_ERA(), true, false], [CF::YEAR(), true, false], [CF::ERA(), true, false], [CF::AMPM_OF_DAY(), false, true], [CF::CLOCK_HOUR_OF_DAY(), false, true], [CF::HOUR_OF_DAY(), false, true], [CF::CLOCK_HOUR_OF_AMPM(), false, true], [CF::HOUR_OF_AMPM(), false, true], [CF::MINUTE_OF_DAY(), false, true], [CF::MINUTE_OF_HOUR(), false, true], [CF::SECOND_OF_DAY(), false, true], [CF::SECOND_OF_MINUTE(), false, true], [CF::MILLI_OF_DAY(), false, true], [CF::MILLI_OF_SECOND(), false, true], [CF::MICRO_OF_DAY(), false, true], [CF::MICRO_OF_SECOND(), false, true], [CF::NANO_OF_DAY(), false, true], [CF::NANO_OF_SECOND(), false, true]];
 }
예제 #10
0
 protected function resolveProlepticMonth(FieldValues $fieldValues, ResolverStyle $resolverStyle)
 {
     $pMonth = $fieldValues->remove(ChronoField::PROLEPTIC_MONTH());
     if ($pMonth != null) {
         if ($resolverStyle != ResolverStyle::LENIENT()) {
             ChronoField::PROLEPTIC_MONTH()->checkValidValue($pMonth);
         }
         // first day-of-month is likely to be safest for setting proleptic-month
         // cannot add to year zero, as not all chronologies have a year zero
         $chronoDate = $this->dateNow()->with(ChronoField::DAY_OF_MONTH(), 1)->with(ChronoField::PROLEPTIC_MONTH(), $pMonth);
         self::addFieldValue($fieldValues, ChronoField::MONTH_OF_YEAR(), $chronoDate->get(ChronoField::MONTH_OF_YEAR()));
         self::addFieldValue($fieldValues, ChronoField::YEAR(), $chronoDate->get(ChronoField::YEAR()));
     }
 }
예제 #11
0
 /**
  * Adjusts the specified temporal object to have this year-month.
  * <p>
  * This returns a temporal object of the same observable type as the input
  * with the year and month changed to be the same as this.
  * <p>
  * The adjustment is equivalent to using {@link Temporal#with(TemporalField, long)}
  * passing {@link ChronoField#PROLEPTIC_MONTH} as the field.
  * If the specified temporal object does not use the ISO calendar system then
  * a {@code DateTimeException} is thrown.
  * <p>
  * In most cases, it is clearer to reverse the calling pattern by using
  * {@link Temporal#with(TemporalAdjuster)}:
  * <pre>
  *   // these two lines are equivalent, but the second approach is recommended
  *   temporal = thisYearMonth.adjustInto(temporal);
  *   temporal = temporal.with(thisYearMonth);
  * </pre>
  * <p>
  * This instance is immutable and unaffected by this method call.
  *
  * @param Temporal $temporal the target object to be adjusted, not null
  * @return Temporal the adjusted object, not null
  * @throws DateTimeException if unable to make the adjustment
  * @throws ArithmeticException if numeric overflow occurs
  */
 public function adjustInto(Temporal $temporal)
 {
     if (AbstractChronology::from($temporal)->equals(IsoChronology::INSTANCE()) == false) {
         throw new DateTimeException("Adjustment only supported on ISO date-time");
     }
     return $temporal->with(ChronoField::PROLEPTIC_MONTH(), $this->getProlepticMonth());
 }
 function data_resolveThreeToDate()
 {
     return [[ChronoField::YEAR(), 2012, ChronoField::MONTH_OF_YEAR(), 2, ChronoField::DAY_OF_MONTH(), 1, LocalDate::of(2012, 2, 1)], [ChronoField::YEAR(), 2012, ChronoField::ALIGNED_WEEK_OF_YEAR(), 5, ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR(), 4, LocalDate::of(2012, 2, 1)], [ChronoField::YEAR(), 2012, ChronoField::ALIGNED_WEEK_OF_YEAR(), 5, ChronoField::DAY_OF_WEEK(), 3, LocalDate::of(2012, 2, 1)], [ChronoField::YEAR(), 2012, ChronoField::DAY_OF_YEAR(), 32, ChronoField::DAY_OF_MONTH(), 1, LocalDate::of(2012, 2, 1)], [ChronoField::YEAR_OF_ERA(), 2012, ChronoField::DAY_OF_YEAR(), 32, ChronoField::DAY_OF_MONTH(), 1, LocalDate::of(2012, 2, 1)], [ChronoField::YEAR(), 2012, ChronoField::DAY_OF_YEAR(), 32, ChronoField::DAY_OF_WEEK(), 3, LocalDate::of(2012, 2, 1)], [ChronoField::PROLEPTIC_MONTH(), 2012 * 12 + (2 - 1), ChronoField::DAY_OF_MONTH(), 25, ChronoField::DAY_OF_WEEK(), 6, LocalDate::of(2012, 2, 25)]];
 }
 function data_normalized()
 {
     return [[ChronoField::YEAR(), 2127, ChronoField::YEAR(), 2127], [ChronoField::MONTH_OF_YEAR(), 12, ChronoField::MONTH_OF_YEAR(), 12], [ChronoField::DAY_OF_YEAR(), 127, ChronoField::DAY_OF_YEAR(), 127], [ChronoField::DAY_OF_MONTH(), 23, ChronoField::DAY_OF_MONTH(), 23], [ChronoField::DAY_OF_WEEK(), 127, ChronoField::DAY_OF_WEEK(), 127], [ChronoField::ALIGNED_WEEK_OF_YEAR(), 23, ChronoField::ALIGNED_WEEK_OF_YEAR(), 23], [ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR(), 4, ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR(), 4], [ChronoField::ALIGNED_WEEK_OF_MONTH(), 4, ChronoField::ALIGNED_WEEK_OF_MONTH(), 4], [ChronoField::ALIGNED_DAY_OF_WEEK_IN_MONTH(), 3, ChronoField::ALIGNED_DAY_OF_WEEK_IN_MONTH(), 3], [ChronoField::PROLEPTIC_MONTH(), 27, ChronoField::PROLEPTIC_MONTH(), null], [ChronoField::PROLEPTIC_MONTH(), 27, ChronoField::YEAR(), 2], [ChronoField::PROLEPTIC_MONTH(), 27, ChronoField::MONTH_OF_YEAR(), 4]];
 }
예제 #14
0
 public function test_isSupported_TemporalField()
 {
     // TODO check
     //$this->assertEquals(TEST_2008.isSupported((TemporalField) null()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::NANO_OF_SECOND()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::NANO_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MICRO_OF_SECOND()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MICRO_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MILLI_OF_SECOND()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MILLI_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::SECOND_OF_MINUTE()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::SECOND_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MINUTE_OF_HOUR()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MINUTE_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::HOUR_OF_AMPM()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::CLOCK_HOUR_OF_AMPM()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::HOUR_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::CLOCK_HOUR_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::AMPM_OF_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::DAY_OF_WEEK()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::ALIGNED_DAY_OF_WEEK_IN_MONTH()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::ALIGNED_DAY_OF_WEEK_IN_YEAR()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::DAY_OF_MONTH()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::DAY_OF_YEAR()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::EPOCH_DAY()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::ALIGNED_WEEK_OF_MONTH()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::ALIGNED_WEEK_OF_YEAR()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::MONTH_OF_YEAR()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::PROLEPTIC_MONTH()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::YEAR()), true);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::YEAR_OF_ERA()), true);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::ERA()), true);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::INSTANT_SECONDS()), false);
     $this->assertEquals(self::$TEST_2008->isSupported(ChronoField::OFFSET_SECONDS()), false);
 }