Package javax.time.calendar

Examples of javax.time.calendar.MonthOfYear


            return 28;
        }
        @Override
        public int getMaximumValue(Calendrical calendrical) {
            Integer year = calendrical.get(chrono.yearRule());
            MonthOfYear moy = calendrical.get(chrono.monthOfYearRule());
            if (moy != null) {
                if (year != null) {
                    return moy.lengthInDays(chrono.isLeapYear(year));
                } else {
                    return moy.maxLengthInDays();
                }
            }
            return getMaximumValue();
        }
View Full Code Here


            HistoricDate cd = calendrical.get(HistoricDate.rule());
            return cd != null ? cd.getYear() : null;
        }
        @Override
        protected void merge(CalendricalMerger merger) {
            MonthOfYear moy = merger.getValue(chrono.monthOfYearRule());
            Integer domVal = merger.getValue(chrono.dayOfMonthRule());
            if (moy != null && domVal != null) {
                int year = merger.getValue(this);
                HistoricDate date;
                if (merger.getContext().isStrict()) {
                    date = HistoricDate.of(year, moy, domVal);
                } else {
                    // TODO: date in cutover
                    date = HistoricDate.of(year, MonthOfYear.JANUARY, 1)
                                .plusMonths(moy.getValue() - 1).plusMonths(-1).plusDays(domVal).plusDays(-1);
                }
                merger.storeMerged(LocalDate.rule(), date.toLocalDate());
                merger.removeProcessed(this);
                merger.removeProcessed(chrono.monthOfYearRule());
                merger.removeProcessed(chrono.dayOfMonthRule());
View Full Code Here

TOP

Related Classes of javax.time.calendar.MonthOfYear

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.