/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
/** * Gets the period type, which is <code>minutes</code>. * * @return the period type */ public PeriodType getPeriodType() { return PeriodType.minutes(); }
@Override public int getDuration(DateTime now, DateTime expiryDate) { Interval interval = new Interval(now.withMillisOfSecond(0), expiryDate); return interval.toPeriod(PeriodType.minutes()).getMinutes(); }
@Override public int getDuration(DateTime now, DateTime expiryDate) { Interval interval = new Interval(now.withMillisOfSecond(0), expiryDate); return interval.toPeriod(PeriodType.minutes()).getMinutes(); }
@Override public Period random() { return new Period(RandomData.randomLong(0, 1000), RandomData.random( Arrays.asList( PeriodType.millis(), PeriodType.seconds(), PeriodType.minutes(), PeriodType.hours(), PeriodType.days(), PeriodType.weeks(), PeriodType.months(), PeriodType.years() ))); }
public int difference(DateTime from, DateTime to) { if(this==WEEK) throw new UnsupportedOperationException(); from = truncate(from); to = truncate(to); PeriodType pt = PeriodType.minutes(); if (this == HOUR) pt = PeriodType.hours(); else if (this == DAY) pt = PeriodType.days(); else if (this == MONTH || this == QUARTER) pt = PeriodType.months(); else if (this == YEAR) pt = PeriodType.years(); Period p = new Period(from, to, pt); if (this == MINUTE) return p.getMinutes(); else if (this == HOUR) return p.getHours(); else if (this == DAY) return p.getDays(); else if (this == MONTH) return p.getMonths(); else if (this == QUARTER) return p.getMonths() / 3; return p.getYears(); }