Examples of withStart()


Examples of org.joda.time.Interval.withStart()

        // set start to last calc'd or start or working period if after
        // last calced
        if (workingHours.getStart().isAfter(lastCalculated)) {
          // leave start of working hours as is
        } else if (workingHours.contains(lastCalculated)) {
          workingHours = workingHours.withStart(lastCalculated);
        } else if (workingHours.getEnd().isBefore(lastCalculated)) {
          workingHours = new Interval(lastCalculated, lastCalculated); // zero
          // time
          // duration
        }
View Full Code Here

Examples of org.joda.time.Interval.withStart()

    counts = aggregateCount.getCounts();
    assertEquals(3, counts.length);

    // Query beyond the period where we have data
    DateTime newStart = start.withYear(2012);
    aggregateCount = aggregateCounterRepository.getCounts(counterName, queryInterval.withStart(newStart), AggregateCountResolution.day);
    counts = aggregateCount.getCounts();
    assertEquals(368, counts.length);

    aggregateCount = aggregateCounterRepository.getCounts(counterName, queryInterval.withStart(newStart), AggregateCountResolution.month);
  }
View Full Code Here

Examples of org.joda.time.Interval.withStart()

    DateTime newStart = start.withYear(2012);
    aggregateCount = aggregateCounterRepository.getCounts(counterName, queryInterval.withStart(newStart), AggregateCountResolution.day);
    counts = aggregateCount.getCounts();
    assertEquals(368, counts.length);

    aggregateCount = aggregateCounterRepository.getCounts(counterName, queryInterval.withStart(newStart), AggregateCountResolution.month);
  }
}
View Full Code Here

Examples of org.joda.time.Interval.withStart()

            // Truncate start
            if (truncatedInterval.toPeriod(type).getValue(0) > --limit) {
                Period limitPeriod = period(limit, type);
                DateTime truncatedStart = truncatedInterval.getEnd().minus(limitPeriod);
                truncatedInterval = truncatedInterval.withStart(truncatedStart);
            }
        }
        return truncatedInterval;
    }
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.