Package org.joda.time

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


        if (lastChangeDaysThreshold != null) {
            String lastChangeTimeField = resource.getAdditionalField(EddaASGJanitorCrawler.ASG_FIELD_LAST_CHANGE_TIME);
            if (StringUtils.isNotBlank(lastChangeTimeField)) {
                DateTime lastChangeTime = new DateTime(Long.parseLong(lastChangeTimeField));
                if (lastChangeTime.plusDays(lastChangeDaysThreshold).isAfter(now)) {
                    LOGGER.info(String.format("ASG %s had change during the last %d days",
                            resource.getId(), lastChangeDaysThreshold));
                    return true;
                }
            }
View Full Code Here


    Selector selector = builder.build();

    Assert.assertEquals(selector.getDateRange().getMin(), formatStart);
    Assert.assertEquals(selector.getDateRange().getMax(), formatEnd);

    String formatEndPlusOne = dateFormat.format(end.plusDays(1).toDate());

    DateRange dateRange = new DateRange();
    dateRange.setMin(formatStart);
    dateRange.setMax(formatEndPlusOne);
View Full Code Here

        DateTime dt = new DateTime(thisGame.getVirtualStartDate().getTime())// virtual start day

     
     
        // virtual date that is virtualDaysPast after the start day
        Timestamp ts = new Timestamp(dt.plusDays(virtualDaysPast).getMillis());
        Timestamp todaysDate = round_to_day(new Timestamp(System.currentTimeMillis()));
        //Logger.info("days past: "+virtualDaysPast);
        while (ts.before(todaysDate) && !isTradingDay(ts)) {
            ts = new Timestamp(ts.getTime() + aDayInMS);
            thisGame.setVirtualDaysSkipped(thisGame.getVirtualDaysSkipped() + 1);
View Full Code Here

                break;
            }
            case TODAY:
            {
                begin = new DateMidnight().toDateTime();
                end = begin.plusDays(1);
                interval = AggregationInterval.DAY;
                break;
            }
            case YESTERDAY:
            {
View Full Code Here

        final DateTime today = clockService.now().toDateTimeAtStartOfDay();
       
        if(dueBy.isBefore(today)) {
            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
View Full Code Here

            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
View Full Code Here

            dateTime = new DateTime();
        }

        switch ( new Character(unit.toCharArray()[0]) ) {
            case 'd':
                dateTime = dateTime.plusDays(adjustmentAmount);
                break;
            case 'm':
                dateTime = dateTime.plusMonths(adjustmentAmount);
                break;
        }
View Full Code Here

            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
        return DateRange.Later;
    }
    //endregion
View Full Code Here

        final DateTime today = clockService.now().toDateTimeAtStartOfDay();
       
        if(dueBy.isBefore(today)) {
            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
View Full Code Here

            return DateRange.OverDue;
        }
        if(dueBy.isBefore(today.plusDays(1))) {
            return DateRange.Today;
        }
        if(dueBy.isBefore(today.plusDays(2))) {
            return DateRange.Tomorrow;
        }
        if(dueBy.isBefore(today.plusDays(7))) {
            return DateRange.ThisWeek;
        }
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.