Example usage for org.joda.time Period withWeeks

List of usage examples for org.joda.time Period withWeeks

Introduction

In this page you can find the example usage for org.joda.time Period withWeeks.

Prototype

public Period withWeeks(int weeks) 

Source Link

Document

Returns a new period with the specified number of weeks.

Usage

From source file:com.eviware.loadui.ui.fx.views.analysis.linechart.MillisToTickMark.java

License:EUPL

private Period trimPeriod(Period period) {
    period = period.normalizedStandard();
    switch (zoomLevelProperty.get()) {
    case WEEKS://from  w w w .  ja  va  2  s  .c  om
        period = period.withWeeks(0);
    case DAYS:
        period = period.withDays(0);
    case HOURS:
        period = period.withHours(0);
    case MINUTES:
        period = period.withMinutes(0);
    default:
        break;
    }
    return period;
}