Package org.joda.time

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


            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


            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

      this.timeInMillis = dateTime.getMillis();
    }
   
    public void addDays2(int day) {
      DateTime datetime = new DateTime(this.timeInMillis);
      datetime.plusDays(day);
      this.timeInMillis = datetime.getMillis();
    }
   
    public void addHours(int hour) {
      MutableDateTime dateTime = new MutableDateTime(this.timeInMillis);
View Full Code Here

            } else if (dt.getMinuteOfHour() != 0) {
                return dt.plusMinutes(1);
            } else if (dt.getHourOfDay() != 0) {
                return dt.plusHours(1);
            } else {
                return dt.plusDays(1);
            }
        default:
            return null;
        }
    }
View Full Code Here

  }

  protected void doSpinnerDurationStateChanged(final ChangeEvent e) {
    Integer integer = (Integer) spinnerDuration.getValue();
    DateTime from = new DateTime(dateFrom.getDate());
    dateTo.setDate(from.plusDays(integer).toDate());
  }

  @Override
  protected void prepareView() throws Exception {
    cbEmployee.removeAllItems();
View Full Code Here

     */
    public DateTime getSessionTradingDate(DateTime dt) {
        DateTime workingDate = new DateTime(dt);
        while(calculator.isNonWorkingDay(workingDate.toLocalDate()) ||
            !isWorkingDay(workingDate.toLocalDate())) {
            workingDate = workingDate.plusDays(1);
        }
        return workingDate;
    }
   
    /**
 
View Full Code Here

                if (guestService.getApiKey(updateInfo.apiKey.getId())==null) {
                    logger.info("Not updating BodyMedia connector instance with a deleted apiKeyId");
                    return;
                }
                String startPeriod = current.toString(formatter);
                String endPeriod = current.plusDays(increment - 1).toString(formatter);
                String minutesUrl = "http://api.bodymedia.com/v2/json/" + urlExtension + startPeriod + "/" + endPeriod +
                                    "?api_key=" + guestService.getApiKeyAttribute(updateInfo.apiKey, "bodymediaConsumerKey");
                //The following call may fail due to bodymedia's api. That is expected behavior
                enforceRateLimits(rateDelay);
                String json = signpostHelper.makeRestCall(updateInfo.apiKey, ot.value(), minutesUrl);
View Full Code Here

    );

    Assert.assertTrue(rule.appliesTo(builder.interval(new Interval(now.minusWeeks(1), now)).build(), now));
    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusDays(1), now.plusDays(1)))
                   .build(),
            now
        )
    );
    Assert.assertFalse(
View Full Code Here

            now
        )
    );
    Assert.assertFalse(
        rule.appliesTo(
            builder.interval(new Interval(now.plusDays(1), now.plusDays(2)))
                       .build(),
            now
        )
    );
  }
View Full Code Here

            now
        )
    );
    Assert.assertFalse(
        rule.appliesTo(
            builder.interval(new Interval(now.plusDays(1), now.plusDays(2)))
                       .build(),
            now
        )
    );
  }
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.