Examples of minusMinutes()


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

   
    if (start == null) {
      // set start to current time, rounded to hours
      DateTime startDate = DateTime.now();
      startDate = startDate.plusHours(1);
      startDate = startDate.minusMinutes(startDate.getMinuteOfHour());
      startDate = startDate.minusSeconds(startDate.getSecondOfMinute());
      startDate = startDate.minusMillis(startDate.getMillisOfSecond());
      start = startDate.toString();
    }
    ObjectNode startObj = JOM.createObjectNode();
View Full Code Here

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

    DateTime next = DateTime.now();
    next = next.minusMillis(next.getMillisOfSecond());
    next = next.minusSeconds(next.getSecondOfMinute());

    if (next.getMinuteOfHour() > 30) {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(60);
    } else {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(30);
    }
View Full Code Here

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

    if (next.getMinuteOfHour() > 30) {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(60);
    } else {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(30);
    }

    return next;
  }
View Full Code Here

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

    DateTime next = DateTime.now();
    next = next.minusMillis(next.getMillisOfSecond());
    next = next.minusSeconds(next.getSecondOfMinute());

    if (next.getMinuteOfHour() > 30) {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(60);
    } else {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(30);
    }
View Full Code Here

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

    if (next.getMinuteOfHour() > 30) {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(60);
    } else {
      next = next.minusMinutes(next.getMinuteOfHour());
      next = next.plusMinutes(30);
    }

    return next;
  }
View Full Code Here

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

        if (start == null) {
            // set start to current time, rounded to hours
            DateTime startDate = DateTime.now();
            startDate = startDate.plusHours(1);
            startDate = startDate.minusMinutes(startDate.getMinuteOfHour());
            startDate = startDate.minusSeconds(startDate.getSecondOfMinute());
            startDate = startDate.minusMillis(startDate.getMillisOfSecond());
            start = startDate.toString();
        }
        ObjectNode startObj = JOM.createObjectNode();
View Full Code Here

Examples of org.joda.time.TimeOfDay.minusMinutes()

        TimeOfDay start = new TimeOfDay(12, 30, GJChronology.getInstance());
        TimeOfDay end = new TimeOfDay(10, 30, GJChronology.getInstance());
        assertEquals(end, start.plusHours(22));
        assertEquals(start, end.minusHours(22));
        assertEquals(end, start.plusMinutes(22 * 60));
        assertEquals(start, end.minusMinutes(22 * 60));
    }

    public void testMaximumValue() {
        DateMidnight dt = new DateMidnight(1570, 1, 1, GJChronology.getInstance());
        while (dt.getYear() < 1590) {
View Full Code Here

Examples of org.joda.time.TimeOfDay.minusMinutes()

        TimeOfDay start = new TimeOfDay(12, 30);
        TimeOfDay end = new TimeOfDay(10, 30);
        assertEquals(end, start.plusHours(22));
        assertEquals(start, end.minusHours(22));
        assertEquals(end, start.plusMinutes(22 * 60));
        assertEquals(start, end.minusMinutes(22 * 60));
    }

    public void testPartialDayOfYearAdd() {
        Partial start = new Partial().with(DateTimeFieldType.year(), 2000).with(DateTimeFieldType.dayOfYear(), 366);
        Partial end = new Partial().with(DateTimeFieldType.year(), 2004).with(DateTimeFieldType.dayOfYear(), 366);
View Full Code Here

Examples of org.joda.time.TimeOfDay.minusMinutes()

        TimeOfDay start = new TimeOfDay(12, 30, GJChronology.getInstance());
        TimeOfDay end = new TimeOfDay(10, 30, GJChronology.getInstance());
        assertEquals(end, start.plusHours(22));
        assertEquals(start, end.minusHours(22));
        assertEquals(end, start.plusMinutes(22 * 60));
        assertEquals(start, end.minusMinutes(22 * 60));
    }

    public void testMaximumValue() {
        DateMidnight dt = new DateMidnight(1570, 1, 1, GJChronology.getInstance());
        while (dt.getYear() < 1590) {
View Full Code Here

Examples of org.joda.time.TimeOfDay.minusMinutes()

        TimeOfDay start = new TimeOfDay(12, 30);
        TimeOfDay end = new TimeOfDay(10, 30);
        assertEquals(end, start.plusHours(22));
        assertEquals(start, end.minusHours(22));
        assertEquals(end, start.plusMinutes(22 * 60));
        assertEquals(start, end.minusMinutes(22 * 60));
    }

    public void testPartialDayOfYearAdd() {
        Partial start = new Partial().with(DateTimeFieldType.year(), 2000).with(DateTimeFieldType.dayOfYear(), 366);
        Partial end = new Partial().with(DateTimeFieldType.year(), 2004).with(DateTimeFieldType.dayOfYear(), 366);
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.