Package org.joda.time

Examples of org.joda.time.DateTime.withDayOfWeek()


    private void calculateFirstAndLastInstantInWeeklyMode(YearMonthDay begin) {
        if (begin == null) {
            throw new IllegalArgumentException();
        }
        DateTime beginDateTime = begin.toDateTimeAtMidnight();
        beginDateTime = (beginDateTime.getDayOfWeek() != 1) ? beginDateTime.withDayOfWeek(1) : beginDateTime;
        setFirstInstant(beginDateTime);
        setLastInstant(beginDateTime.plusDays(6));
    }

    private void calculateFirstAndLastInstantInTotalMode(YearMonthDay begin, YearMonthDay end) {
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.