Package javax.time.calendar.field

Examples of javax.time.calendar.field.DayOfWeek.ordinal()


            DayOfWeek dow = date.getDayOfWeek();
            if (relative < 2 && dow == this.dow) {
                return date;
            }
            if ((relative & 1) == 0) {
                int daysDiff = dow.ordinal() - this.dow.ordinal();
                return date.plusDays(daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
            } else {
                int daysDiff = this.dow.ordinal() - dow.ordinal();
                return date.minusDays(daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
            }
View Full Code Here


            }
            if ((relative & 1) == 0) {
                int daysDiff = dow.ordinal() - this.dow.ordinal();
                return date.plusDays(daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
            } else {
                int daysDiff = this.dow.ordinal() - dow.ordinal();
                return date.minusDays(daysDiff >= 0 ? 7 - daysDiff : -daysDiff);
            }
        }

        /** {@inheritDoc} */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.