Package org.joda.time

Examples of org.joda.time.MutableDateTime.addDays()


      DateTime start = d.toDateTime();
      DateTime end = start.plusDays(1);
      Weight wi = new Weight(start, end,
          WEIGHT_DELAY_PER_DAY * i);
      preferredIntervals.add(wi);
      d.addDays(1);
    }

    // order and store the aggregated lists with intervals
    IntervalsUtil.order(infeasibleIntervals);
    getState().put("infeasible", infeasibleIntervals);
View Full Code Here


      this.timeInMillis = dateTime.getMillis();
    }

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

      DateTime start = d.toDateTime();
      DateTime end = start.plusDays(1);
      Weight wi = new Weight(start, end,
          WEIGHT_DELAY_PER_DAY * i);
      preferredIntervals.add(wi);
      d.addDays(1);
    }

    // order and store the aggregated lists with intervals
    IntervalsUtil.order(infeasibleIntervals);
    getState().put("infeasible", infeasibleIntervals);
View Full Code Here

      DateTime start = d.toDateTime();
      DateTime end = start.plusDays(1);
      Weight wi = new Weight(start, end,
          WEIGHT_DELAY_PER_DAY * i);
      preferredIntervals.add(wi);
      d.addDays(1);
    }

    // order and store the aggregated lists with intervals
    IntervalsUtil.order(infeasibleIntervals);
    getState().put("infeasible", infeasibleIntervals);
View Full Code Here

                                dateTime.dayOfMonth().roundCeiling();
                            } else {
                                dateTime.dayOfMonth().roundFloor();
                            }
                        } else if (type == 1) {
                            dateTime.addDays(num);
                        } else if (type == 2) {
                            dateTime.addDays(-num);
                        }
                        break;
                    case 'h':
View Full Code Here

                                dateTime.dayOfMonth().roundFloor();
                            }
                        } else if (type == 1) {
                            dateTime.addDays(num);
                        } else if (type == 2) {
                            dateTime.addDays(-num);
                        }
                        break;
                    case 'h':
                    case 'H':
                        if (type == 0) {
View Full Code Here

   
    MutableDateTime time = new MutableDateTime(timeMin);
    while (time.isBefore(timeMax)) {
      // find the first working day inside the interval
      while (!workingDays.contains(time.getDayOfWeek())) {
        time.addDays(1);
      }
     
      // set working hours to today
      workingDayMin.setDate(time);
      workingDayMax.setDate(time);
View Full Code Here

        Interval hours = new Interval(start, end);
        available.add(hours);
      }
     
      // move to the next day
      time.addDays(1);
    }
   
    return available;
  }
}
View Full Code Here

      DateTime start = d.toDateTime();
      DateTime end = start.plusDays(1);
      Weight wi = new Weight(start, end,
          WEIGHT_DELAY_PER_DAY * i);
      preferredIntervals.add(wi);
      d.addDays(1);
    }

    // order and store the aggregated lists with intervals
    IntervalsUtil.order(infeasibleIntervals);
    getState().put("infeasible", infeasibleIntervals);
View Full Code Here

                    activity.addTag(Key.create(tag));
                }
                activities.add(activity);
                mdt.hourOfDay().add(hours);
            }
            mdt.addDays(1);
        }
        return activities;
    }
}
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.