Package org.joda.time

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


    // add delay penalties to the soft constraints
    DateTime now = DateTime.now();
    MutableDateTime d = new MutableDateTime(now.getYear(),
        now.getMonthOfYear(), now.getDayOfMonth(), 0, 0, 0, 0);
    for (int i = 0; i <= LOOK_AHEAD_DAYS; i++) {
      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);
 
View Full Code Here


    // add delay penalties to the soft constraints
    DateTime now = DateTime.now();
    MutableDateTime d = new MutableDateTime(now.getYear(),
        now.getMonthOfYear(), now.getDayOfMonth(), 0, 0, 0, 0);
    for (int i = 0; i <= LOOK_AHEAD_DAYS; i++) {
      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);
 
View Full Code Here

        DateTime lowerLimit = iLowerLimit;
        if (lowerLimit != null) {
            MutableDateTime mdt = lowerLimit.toMutableDateTime();
            mdt.setZoneRetainFields(zone);
            lowerLimit = mdt.toDateTime();
        }

        DateTime upperLimit = iUpperLimit;
        if (upperLimit != null) {
            MutableDateTime mdt = upperLimit.toMutableDateTime();
View Full Code Here

        DateTime upperLimit = iUpperLimit;
        if (upperLimit != null) {
            MutableDateTime mdt = upperLimit.toMutableDateTime();
            mdt.setZoneRetainFields(zone);
            upperLimit = mdt.toDateTime();
        }
       
        LimitChronology chrono = getInstance
            (getBase().withZone(zone), lowerLimit, upperLimit);
View Full Code Here

                    int month = Integer.parseInt(m.group(2));
                    int day = Integer.parseInt(m.group(3));
                    MutableDateTime created = new MutableDateTime(0L, DateTimeZone.UTC);
                    created.setTime(0, 0, 0, 0);
                    created.setDate(year, month, day);
                    dirs.add(new DirByDate(dir, created.toDateTime()));
                    continue;
                } catch (IllegalArgumentException e) {
                    LOG.warn("Invalid directory name {}, will skip", dir.getAbsolutePath());
                }
            }
View Full Code Here

    // add delay penalties to the soft constraints
    DateTime now = DateTime.now();
    MutableDateTime d = new MutableDateTime(now.getYear(),
        now.getMonthOfYear(), now.getDayOfMonth(), 0, 0, 0, 0);
    for (int i = 0; i <= LOOK_AHEAD_DAYS; i++) {
      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);
 
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.