Package org.joda.time

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


        intervalInitDate = intervalInitDate.minusMonths(1);
        assertTrue(resourceAllocationDAO.findAllocationsRelatedToAnyOf(current,
                resources,
                intervalInitDate, intervalEndDate).contains(resourceAllocation1));

        intervalEndDate = intervalEndDate.minusMonths(1);
        assertFalse(resourceAllocationDAO.findAllocationsRelatedToAnyOf(
                current, resources,
                intervalInitDate, intervalEndDate).contains(resourceAllocation1));

        assertTrue(resourceAllocationDAO.findAllocationsRelatedToAnyOf(current,
View Full Code Here


     * </p>
     */
    @Scheduled(cron = "0 0 0 * * ?")
    public void removeOldPersistentTokens() {
        LocalDate now = new LocalDate();
        List<PersistentToken> tokens = persistentTokenRepository.findByTokenDateBefore(now.minusMonths(1));
        for (PersistentToken token : tokens) {
            log.debug("Deleting token {}", token.getSeries());
            User user = token.getUser();
            user.getPersistentTokens().remove(token);
            persistentTokenRepository.delete(token);
View Full Code Here

            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()) {
                nextDueLocalDate = nextDueLocalDate.minusDays(7 * this.feeInterval);
                nextDueLocalDate = setDayOfWeek(nextDueLocalDate);
            }
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.