/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear() - 1, getMaxYear() + 1); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); long instant = getYearMonthDayMillis(year, monthOfYear, dayOfMonth); // check for limit caused by min/max year +1/-1 if (instant < 0 && year == getMaxYear() + 1) { return Long.MAX_VALUE; } else if (instant > 0 && year == getMinYear() - 1) { return Long.MIN_VALUE; } return instant; }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear() - 1, getMaxYear() + 1); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); long instant = getYearMonthDayMillis(year, monthOfYear, dayOfMonth); // check for limit caused by min/max year +1/-1 if (instant < 0 && year == getMaxYear() + 1) { return Long.MAX_VALUE; } else if (instant > 0 && year == getMinYear() - 1) { return Long.MIN_VALUE; } return instant; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the maximum month for the specified year. * This implementation calls getMaxMonth(). * * @param year the year * @return the maximum month value */ int getMaxMonth(int year) { return getMaxMonth(); }
/** * Gets the milliseconds for a date at midnight. * * @param year the year * @param monthOfYear the month * @param dayOfMonth the day * @return the milliseconds */ long getDateMidnightMillis(int year, int monthOfYear, int dayOfMonth) { FieldUtils.verifyValueBounds(DateTimeFieldType.year(), year, getMinYear(), getMaxYear()); FieldUtils.verifyValueBounds(DateTimeFieldType.monthOfYear(), monthOfYear, 1, getMaxMonth(year)); FieldUtils.verifyValueBounds(DateTimeFieldType.dayOfMonth(), dayOfMonth, 1, getDaysInYearMonth(year, monthOfYear)); return getYearMonthDayMillis(year, monthOfYear, dayOfMonth); }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }
/** * Restricted constructor. * * @param leapMonth the month of year that leaps */ BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth) { super(DateTimeFieldType.monthOfYear(), chronology.getAverageMillisPerMonth()); iChronology = chronology; iMax = iChronology.getMaxMonth(); iLeapMonth = leapMonth; }