Examples of minus()


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

    }

    public static String getDataPreviousMesi(int numeroMesi) {
        DateTime now = new DateTime();
        ReadablePeriod noUpdatePeriod = new Period().withMonths(numeroMesi);
        return now.minus(noUpdatePeriod).toString();
    }

    public static String getDatapreviousMesiFormattata(int numeroMesi, String regexp) {
        DateTime now = new DateTime();
        ReadablePeriod noUpdatePeriod = new Period().withMonths(numeroMesi);
View Full Code Here

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

    }

    public static String getDatapreviousMesiFormattata(int numeroMesi, String regexp) {
        DateTime now = new DateTime();
        ReadablePeriod noUpdatePeriod = new Period().withMonths(numeroMesi);
        return new SimpleDateFormat(regexp).format(now.minus(noUpdatePeriod).toDate());
    }
}
View Full Code Here

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

      return false;
    }

    DateTime lastShouldRun = monitor.getLastShouldHaveRun();
    DateTime nextRun = lastShouldRun.plus(timePeriod);
    if(now.isAfter(nextRun.minus(1000))) {
      monitor.setLastShouldHaveRun(nextRun);
      return true;
    }
    return false;
  }
View Full Code Here

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

    DateTime lastShouldRun = monitor.getLastShouldHaveRun();
    DateTime nextRun = lastShouldRun.plus(timePeriod);
    if(log.isDebugEnabled())
      log.debug("nextRun="+nextRun+" now="+now+" lastShouldRun="+lastShouldRun);
    if(now.isAfter(nextRun.minus(1000))) {
      monitor.setLastShouldHaveRun(nextRun);
      return true;
    }
    return false;
  }
View Full Code Here

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

    DateTime t = DateTime.now();
    Interval interval = new Interval(t.minusMinutes(1), t.plusMinutes(1));

    index.add(
        new MapBasedInputRow(
            t.minus(1).getMillis(),
            Lists.newArrayList("billy"),
            ImmutableMap.<String, Object>of("billy", "hi")
        )
    );
    index.add(
View Full Code Here

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

            ImmutableMap.<String, Object>of("billy", "hi")
        )
    );
    index.add(
        new MapBasedInputRow(
            t.minus(1).getMillis(),
            Lists.newArrayList("sally"),
            ImmutableMap.<String, Object>of("sally", "bo")
        )
    );
View Full Code Here

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

    dimSelector = cursor.makeDimensionSelector("sally");
    Assert.assertEquals("bo", dimSelector.lookupName(dimSelector.getRow().get(0)));

    index.add(
        new MapBasedInputRow(
            t.minus(1).getMillis(),
            Lists.newArrayList("sally"),
            ImmutableMap.<String, Object>of("sally", "ah")
        )
    );
View Full Code Here

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

    );

    DateTime t = DateTime.now();
    index.add(
        new MapBasedInputRow(
            t.minus(1).getMillis(),
            Lists.newArrayList("sally"),
            ImmutableMap.<String, Object>of("sally", "bo")
        )
    );
View Full Code Here

Examples of org.joda.time.YearMonthDay.minus()

        // caused an exception to be thrown when subtracting days.
        DateTime dt = new DateTime
            (1112306400000L, GJChronology.getInstance(DateTimeZone.forID("Europe/Berlin")));
        YearMonthDay ymd = dt.toYearMonthDay();
        while (ymd.toDateTimeAtMidnight().getDayOfWeek() != DateTimeConstants.MONDAY) {
            ymd = ymd.minus(Period.days(1));
        }
    }

    private void testAdd(String start, DurationFieldType type, int amt, String end) {
        DateTime dtStart = new DateTime(start, GJChronology.getInstance(DateTimeZone.UTC));
View Full Code Here

Examples of org.joda.time.YearMonthDay.minus()

        // caused an exception to be thrown when subtracting days.
        DateTime dt = new DateTime
            (1112306400000L, GJChronology.getInstance(DateTimeZone.forID("Europe/Berlin")));
        YearMonthDay ymd = dt.toYearMonthDay();
        while (ymd.toDateTimeAtMidnight().getDayOfWeek() != DateTimeConstants.MONDAY) {
            ymd = ymd.minus(Period.days(1));
        }
    }

    private void testAdd(String start, DurationFieldType type, int amt, String end) {
        DateTime dtStart = new DateTime(start, GJChronology.getInstance(DateTimeZone.UTC));
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.