List of usage examples for org.joda.time Period withDays
public Period withDays(int days)
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. j av a2 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; }
From source file:nz.co.gregs.dbvolution.internal.datatypes.DateRepeatImpl.java
License:Apache License
/** * * @param intervalStr/*from w w w . j a v a 2 s . c o m*/ * @return the DateRepeat value represented by the String value */ public static Period parseDateRepeatFromGetString(String intervalStr) { if (intervalStr == null || intervalStr.length() == 0) { return null; } System.out.println("DBV INTERVAL: " + intervalStr); Period interval = new Period(); interval = interval.withYears(getYearPart(intervalStr)); interval = interval.withMonths(getMonthPart(intervalStr)); interval = interval.withDays(getDayPart(intervalStr)); interval = interval.withHours(getHourPart(intervalStr)); interval = interval.withMinutes(getMinutePart(intervalStr)); interval = interval.withSeconds(getSecondPart(intervalStr)); interval = interval.withMillis(getMillisecondPart(intervalStr)); return interval; }