Class BasicWeekOfWeekyearDateTimeField


  • final class BasicWeekOfWeekyearDateTimeField
    extends PreciseDurationDateTimeField
    Provides time calculations for the week of a week based year component of time.
    Since:
    1.1, refactored from GJWeekOfWeekyearDateTimeField
    • Constructor Detail

      • BasicWeekOfWeekyearDateTimeField

        BasicWeekOfWeekyearDateTimeField​(BasicChronology chronology,
                                         DurationField weeks)
        Restricted constructor
    • Method Detail

      • get

        public int get​(long instant)
        Get the week of a week based year component of the specified time instant.
        Specified by:
        get in class BaseDateTimeField
        Parameters:
        instant - the time instant in millis to query.
        Returns:
        the week of the year extracted from the input.
        See Also:
        DateTimeField.get(long)
      • getRangeDurationField

        public DurationField getRangeDurationField()
        Description copied from class: BaseDateTimeField
        Returns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.
        Specified by:
        getRangeDurationField in class BaseDateTimeField
        Returns:
        the range duration of this field, or null if field has no range
      • roundFloor

        public long roundFloor​(long instant)
        Description copied from class: PreciseDurationDateTimeField
        This method assumes that this field is properly rounded on 1970-01-01T00:00:00. If the rounding alignment differs, override this method as follows:
         return super.roundFloor(instant + ALIGNMENT_MILLIS) - ALIGNMENT_MILLIS;
         
        Overrides:
        roundFloor in class PreciseDurationDateTimeField
        Parameters:
        instant - the milliseconds from 1970-01-01T00:00:00Z to round
        Returns:
        rounded milliseconds
      • roundCeiling

        public long roundCeiling​(long instant)
        Description copied from class: PreciseDurationDateTimeField
        This method assumes that this field is properly rounded on 1970-01-01T00:00:00. If the rounding alignment differs, override this method as follows:
         return super.roundCeiling(instant + ALIGNMENT_MILLIS) - ALIGNMENT_MILLIS;
         
        Overrides:
        roundCeiling in class PreciseDurationDateTimeField
        Parameters:
        instant - the milliseconds from 1970-01-01T00:00:00Z to round
        Returns:
        rounded milliseconds
      • remainder

        public long remainder​(long instant)
        Description copied from class: PreciseDurationDateTimeField
        This method assumes that this field is properly rounded on 1970-01-01T00:00:00. If the rounding alignment differs, override this method as follows:
         return super.remainder(instant + ALIGNMENT_MILLIS);
         
        Overrides:
        remainder in class PreciseDurationDateTimeField
        Parameters:
        instant - the milliseconds from 1970-01-01T00:00:00Z to get the remainder
        Returns:
        remainder duration, in milliseconds
      • getMaximumValue

        public int getMaximumValue()
        Description copied from class: BaseDateTimeField
        Get the maximum allowable value for this field.
        Specified by:
        getMaximumValue in class BaseDateTimeField
        Returns:
        the maximum valid value for this field, in the units of the field
      • getMaximumValue

        public int getMaximumValue​(long instant)
        Description copied from class: BaseDateTimeField
        Get the maximum value for this field evaluated at the specified time.

        This implementation returns the same as BaseDateTimeField.getMaximumValue().

        Overrides:
        getMaximumValue in class BaseDateTimeField
        Parameters:
        instant - the milliseconds from 1970-01-01T00:00:00Z to query
        Returns:
        the maximum value for this field, in the units of the field
      • readResolve

        private java.lang.Object readResolve()
        Serialization singleton