change age(int) to boolean isOldetThan()
This commit is contained in:
parent
ddf39e8d55
commit
d50f31e7a6
|
@ -98,18 +98,12 @@ public class CareportalEvent implements DataPointWithLabelInterface {
|
|||
return diff.get(TimeUnit.DAYS) + " " + MainApp.sResources.getString(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.sResources.getString(R.string.hours);
|
||||
}
|
||||
|
||||
public String age(int threshold) {
|
||||
public boolean isOlderThan(int threshold) {
|
||||
Map<TimeUnit, Long> diff = computeDiff(date, System.currentTimeMillis());
|
||||
if (OverviewFragment.shorttextmode)
|
||||
if(diff.get(TimeUnit.DAYS) > threshold)
|
||||
return "isOLD"+diff.get(TimeUnit.DAYS) +"d" + diff.get(TimeUnit.HOURS) + "h";
|
||||
return true;
|
||||
else
|
||||
return diff.get(TimeUnit.DAYS) +"d" + diff.get(TimeUnit.HOURS) + "h";
|
||||
else
|
||||
if(diff.get(TimeUnit.DAYS) > threshold)
|
||||
return "isOLD"+diff.get(TimeUnit.DAYS) + " " + MainApp.sResources.getString(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.sResources.getString(R.string.hours);
|
||||
else
|
||||
return diff.get(TimeUnit.DAYS) + " " + MainApp.sResources.getString(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.sResources.getString(R.string.hours);
|
||||
return false;
|
||||
}
|
||||
|
||||
public String log() {
|
||||
|
|
Loading…
Reference in a new issue