Examples of minusYears()


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

            fail();
        } catch (IllegalFieldValueException e) {
        }

        try {
            end.minusYears(1);
            fail();
        } catch (IllegalFieldValueException e) {
        }

        assertEquals(minYear - 1, chrono.year().get(Long.MIN_VALUE));
View Full Code Here

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

      case THISMONTH:
        return dt.minusMonths(1).getMillis();
      case LASTMONTH:
        return dt.minusMonths(2).getMillis();
      case THISYEAR:
        return dt.minusYears(1).getMillis();
      case LASTYEAR:
        return dt.minusYears(2).getMillis();

      }
View Full Code Here

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

      case LASTMONTH:
        return dt.minusMonths(2).getMillis();
      case THISYEAR:
        return dt.minusYears(1).getMillis();
      case LASTYEAR:
        return dt.minusYears(2).getMillis();

      }

    } else {
View Full Code Here

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

      case LASTMONTH:
        return dt.minusMonths(1).getMillis();
      case THISYEAR:
        return dt.getMillis();
      case LASTYEAR:
        return dt.minusYears(1).getMillis();

      }

    } else {
View Full Code Here

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

            fail();
        } catch (IllegalFieldValueException e) {
        }

        try {
            end.minusYears(1);
            fail();
        } catch (IllegalFieldValueException e) {
        }

        assertEquals(minYear - 1, chrono.year().get(Long.MIN_VALUE));
View Full Code Here

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

    cboYearModel.removeAllElements();
   
    while(dateIterator.getYear() >=  this.lowerBound.getYear()){
      this.cboYear.addItem(new Year(dateIterator.getYear()));

      dateIterator = dateIterator.minusYears(1);
    }
   
    this.cboYear.addActionListener(this);
   
    if(selectedYear != null && cboYearModel.getSize() > 0){
View Full Code Here

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

            now
        )
    );
    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusYears(100), now.minusDays(1)))
                       .build(),
            now
        )
    );
  }
View Full Code Here

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

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

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

        if (ctime.matches("^[0-9]+$")) return dateTime.minusDays(Integer.parseInt(ctime)).getMillis();

        // ensure there is at least one digit, and exactly one character suffix, and the suffix is a legal option
        if (!ctime.matches("^[0-9]+[yMwdhms]$")) throw new IllegalArgumentException("Invalid option for ctime: "+ctime);

        if (ctime.endsWith("y")) return dateTime.minusYears(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("M")) return dateTime.minusMonths(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("w")) return dateTime.minusWeeks(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("d")) return dateTime.minusDays(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("h")) return dateTime.minusHours(getCtimeNumber(ctime)).getMillis();
        if (ctime.endsWith("m")) return dateTime.minusMinutes(getCtimeNumber(ctime)).getMillis();
View Full Code Here

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

    final List<VEvent> events = new LinkedList<VEvent>();
    final TeamEventDao teamEventDao = Registry.instance().getDao(TeamEventDao.class);
    final TeamEventFilter eventFilter = new TeamEventFilter();
    eventFilter.setDeleted(false);
    final DateTime now = DateTime.now();
    final Date eventDateLimit = now.minusYears(1).toDate();
    eventFilter.setStartDate(eventDateLimit);
    final boolean exportReminders = "true".equals(params.get(PARAM_EXPORT_REMINDER)) == true;
    for (int i = 0; i < teamCalIds.length; i++) {
      final Integer id = Integer.valueOf(teamCalIds[i]);
      eventFilter.setTeamCalId(id);
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.