Examples of withMonthOfYear()


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

        assertFunction("date_trunc('month', " + DATE_LITERAL + ")", toDate(result));

        result = result.withMonthOfYear(7);
        assertFunction("date_trunc('quarter', " + DATE_LITERAL + ")", toDate(result));

        result = result.withMonthOfYear(1);
        assertFunction("date_trunc('year', " + DATE_LITERAL + ")", toDate(result));
    }

    @Test
    public void testAddFieldToTimestamp()
View Full Code Here

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

          if (delMonth < expire.getMonthOfYear()) {
            // Year rollover, advance a year before setting month
            delivery = delivery.plusYears(1);
          }

          delivery = delivery.withMonthOfYear(delMonth);
          cal.add(new DefaultEvent(Event.Type.LAST_DELIVERY_DATE, delivery));

        }

      }
View Full Code Here

Examples of org.joda.time.LocalDate.withMonthOfYear()

                loanID);
        // MAKE 1
        List fromDateList = (List) loanSchedule.get(1).get("fromDate");
        LocalDate fromDateLocal = LocalDate.now();
        fromDateLocal = fromDateLocal.withYear((int) fromDateList.get(0));
        fromDateLocal = fromDateLocal.withMonthOfYear((int) fromDateList.get(1));
        fromDateLocal = fromDateLocal.withDayOfMonth((int) fromDateList.get(2));

        List dueDateList = (List) loanSchedule.get(1).get("dueDate");
        LocalDate dueDateLocal = LocalDate.now();
        dueDateLocal = dueDateLocal.withYear((int) dueDateList.get(0));
View Full Code Here

Examples of org.joda.time.LocalDate.withMonthOfYear()

        fromDateLocal = fromDateLocal.withDayOfMonth((int) fromDateList.get(2));

        List dueDateList = (List) loanSchedule.get(1).get("dueDate");
        LocalDate dueDateLocal = LocalDate.now();
        dueDateLocal = dueDateLocal.withYear((int) dueDateList.get(0));
        dueDateLocal = dueDateLocal.withMonthOfYear((int) dueDateList.get(1));
        dueDateLocal = dueDateLocal.withDayOfMonth((int) dueDateList.get(2));

        int totalDaysInPeriod = Days.daysBetween(fromDateLocal, dueDateLocal).getDays();

        float totalInterest = (float) loanSchedule.get(1).get("interestOriginalDue");
View Full Code Here

Examples of org.joda.time.LocalDate.withMonthOfYear()

                loanID);
        // MAKE 1
        List fromDateList = (List) loanSchedule.get(1).get("fromDate");
        LocalDate fromDateLocal = LocalDate.now();
        fromDateLocal = fromDateLocal.withYear((int) fromDateList.get(0));
        fromDateLocal = fromDateLocal.withMonthOfYear((int) fromDateList.get(1));
        fromDateLocal = fromDateLocal.withDayOfMonth((int) fromDateList.get(2));

        List dueDateList = (List) loanSchedule.get(1).get("dueDate");
        LocalDate dueDateLocal = LocalDate.now();
        dueDateLocal = dueDateLocal.withYear((int) dueDateList.get(0));
View Full Code Here

Examples of org.joda.time.LocalDate.withMonthOfYear()

        fromDateLocal = fromDateLocal.withDayOfMonth((int) fromDateList.get(2));

        List dueDateList = (List) loanSchedule.get(1).get("dueDate");
        LocalDate dueDateLocal = LocalDate.now();
        dueDateLocal = dueDateLocal.withYear((int) dueDateList.get(0));
        dueDateLocal = dueDateLocal.withMonthOfYear((int) dueDateList.get(1));
        dueDateLocal = dueDateLocal.withDayOfMonth((int) dueDateList.get(2));

        int totalDaysInPeriod = Days.daysBetween(fromDateLocal, dueDateLocal).getDays();

        float totalInterest = (float) loanSchedule.get(1).get("interestOriginalDue");
View Full Code Here

Examples of org.joda.time.LocalDate.withMonthOfYear()

    public void updateToPreviousDueDate() {
        if (isAnnualFee() || isMonthlyFee() || isWeeklyFee()) {
            LocalDate nextDueLocalDate = new LocalDate(dueDate);
            if (isAnnualFee()) {
                nextDueLocalDate = nextDueLocalDate.withMonthOfYear(this.feeOnMonth).minusYears(1);
                nextDueLocalDate = setDayOfMonth(nextDueLocalDate);
            } else if (isMonthlyFee()) {
                nextDueLocalDate = nextDueLocalDate.minusMonths(this.feeInterval);
                nextDueLocalDate = setDayOfMonth(nextDueLocalDate);
            } else if (isWeeklyFee()) {
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.