Examples of plusMonths()


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

        DateTime dt;
        // set up with min values and then add to allow rolling over
        try {
            dt = new DateTime(year, 1, 1, 0, 0 , 0, 0, dtz);

            dt = dt.plusMonths(month - 1)
                    .plusDays(int_args[0] - 1)
                    .plusHours(int_args[1])
                    .plusMinutes(int_args[2])
                    .plusSeconds(int_args[3]);
        } catch (org.joda.time.IllegalFieldValueException e) {
View Full Code Here

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

      // flume clock is ahead or there is some latency, and the year rolled
      if (fixed.isAfter(now) && fixed.minusMonths(1).isAfter(now)) {
        fixed = date.withYear(year - 1);
      // flume clock is behind and the year rolled
      } else if (fixed.isBefore(now) && fixed.plusMonths(1).isBefore(now)) {
        fixed = date.withYear(year + 1);
      }
      date = fixed;
    }
View Full Code Here

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

    DateTime cal1 = new DateTime();
    DateTime cal2 = new DateTime();
    assertTrue(isSameMonthInYear(cal1, cal2));

    cal2 = cal2.plusMonths(1);
    assertFalse(isSameMonthInYear(cal1, cal2));
  }

  @Test
  public void testIsSameMonthInYear_DateTimeAndLocalDate() {
View Full Code Here

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

          }
         
          while (startdate.isBefore(enddate))
          {
            l_dates.add(startdate);
            startdate = startdate.plusMonths(add_months);
          }
         
          l_dates.add(enddate);
        }
       
View Full Code Here

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

        DateTime dt;
        // set up with min values and then add to allow rolling over
        try {
            dt = new DateTime(year, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);

            dt = dt.plusMonths(month - 1)
                    .plusDays(int_args[0] - 1)
                    .plusHours(int_args[1])
                    .plusMinutes(int_args[2])
                    .plusSeconds(int_args[3]);
            if (runtime.is1_9() && !args[5].isNil()) {
View Full Code Here

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

      // flume clock is ahead or there is some latency, and the year rolled
      if (corrected.isAfter(now) && corrected.minusMonths(1).isAfter(now)) {
        corrected = date.withYear(year - 1);
      // flume clock is behind and the year rolled
      } else if (corrected.isBefore(now) && corrected.plusMonths(1).isBefore(now)) {
        corrected = date.withYear(year + 1);
      }
      date = corrected;
    }
View Full Code Here

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

      // flume clock is ahead or there is some latency, and the year rolled
      if (fixed.isAfter(now) && fixed.minusMonths(1).isAfter(now)) {
        fixed = date.withYear(year - 1);
      // flume clock is behind and the year rolled
      } else if (fixed.isBefore(now) && fixed.plusMonths(1).isBefore(now)) {
        fixed = date.withYear(year + 1);
      }
      date = fixed;
    }
View Full Code Here

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

      // flume clock is ahead or there is some latency, and the year rolled
      if (fixed.isAfter(now) && fixed.minusMonths(1).isAfter(now)) {
        fixed = date.withYear(year - 1);
      // flume clock is behind and the year rolled
      } else if (fixed.isBefore(now) && fixed.plusMonths(1).isBefore(now)) {
        fixed = date.withYear(year + 1);
      }
      date = fixed;
    }
View Full Code Here

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

        DateTime dt;
        // set up with min values and then add to allow rolling over
        try {
            dt = new DateTime(year, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);

            dt = dt.plusMonths(month - 1)
                    .plusDays(int_args[0] - 1)
                    .plusHours(int_args[1])
                    .plusMinutes(int_args[2])
                    .plusSeconds(int_args[3]);
View Full Code Here

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

        DateTime dt;
        // set up with min values and then add to allow rolling over
        try {
            dt = new DateTime(year, 1, 1, 0, 0, 0, 0, DateTimeZone.UTC);

            dt = dt.plusMonths(month - 1)
                    .plusDays(int_args[0] - 1)
                    .plusHours(int_args[1])
                    .plusMinutes(int_args[2])
                    .plusSeconds(int_args[3]);
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.