Examples of minusMillis()


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

   * Get the timestamp rounded to the next half hour
   * @return
   */
  private DateTime getNextHalfHour() {
    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);
View Full Code Here

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

   * Get the timestamp rounded to the next half hour
   * @return
   */
  private DateTime getNextHalfHour() {
    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);
View Full Code Here

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

      // 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();
    startObj.put("dateTime", start);
    event.put("start", startObj);
View Full Code Here

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

   * Get the timestamp rounded to the next half hour
   * @return
   */
  private DateTime getNextHalfHour() {
    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);
View Full Code Here

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

            // 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();
        startObj.put("dateTime", start);
        event.put("start", startObj);
View Full Code Here

Examples of org.threeten.bp.Instant.minusMillis()

    assertEquals(2, validUntil._compileCount.get());
    assertEquals(1, validFrom._compileCount.get());
    assertEquals(2, validWithin._compileCount.get());

    // All previously compiled functions, so should use the "ahead" cache
    final CompiledFunctionRepository compiledFunctionsBeforeWithin = cfs.compileFunctionRepository(timestamp.minusMillis(30L));
    assertSame(compiledFunctionsNow, compiledFunctionsBeforeWithin);
    assertEquals(1, alwaysValid._compileCount.get());
    assertEquals(2, validUntil._compileCount.get());
    assertEquals(1, validFrom._compileCount.get());
    assertEquals(2, validWithin._compileCount.get());
View Full Code Here

Examples of org.threeten.bp.Instant.minusMillis()

    assertEquals(2, validUntil._compileCount.get());
    assertEquals(1, validFrom._compileCount.get());
    assertEquals(2, validWithin._compileCount.get());

    // Some functions to be recompiled, others from the "ahead" cache
    final CompiledFunctionRepository compiledFunctionsBeforeBeyond = cfs.compileFunctionRepository(timestamp.minusMillis(31L));
    assertNotSame(compiledFunctionsNow, compiledFunctionsBeforeBeyond);
    assertSame(compiledFunctionsNow.getDefinition(alwaysValid.getUniqueId()), compiledFunctionsBeforeBeyond.getDefinition(alwaysValid.getUniqueId()));
    assertSame(compiledFunctionsNow.getDefinition(validUntil.getUniqueId()), compiledFunctionsBeforeBeyond.getDefinition(validUntil.getUniqueId()));
    assertNotSame(compiledFunctionsNow.getDefinition(validFrom.getUniqueId()), compiledFunctionsBeforeBeyond.getDefinition(validFrom.getUniqueId()));
    assertNotSame(compiledFunctionsNow.getDefinition(validWithin.getUniqueId()), compiledFunctionsBeforeBeyond.getDefinition(validWithin.getUniqueId()));
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.