public class DurationFromDate extends Object implements org.apache.commons.collections.Transformer
Date
is expected as the 'From date' and uses toDate()
to define To or Current Date.#concat(long, String, String)
toDate()
,
- Override if you want to Swap the default meaning of from and to.
Constructor and Description |
---|
DurationFromDate() |
Modifier and Type | Method and Description |
---|---|
protected Object |
concat(long count,
String unit,
long msecs)
If more than 1 make unit plural with "s" suffixed
and return a String
|
protected long |
difference(Date from,
Date to) |
String |
getFuture()
|
String |
getPast()
|
void |
setFuture(String future)
|
void |
setPast(String past)
|
protected Date |
toDate()
Expected in the future compared to input Date
|
Object |
transform(Object input) |
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
protected Object concat(long count, String unit, long msecs)
count
- as longunit
- as Stringmsecs
- as long (actual milli seconds between input date and currentpublic String getFuture()
public void setFuture(String future)
public String getPast()
public void setPast(String past)
Copyright © 2018. All rights reserved.