change age(int) to boolean isOldetThan()
This commit is contained in:
parent
ddf39e8d55
commit
d50f31e7a6
1 changed files with 3 additions and 9 deletions
|
@ -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);
|
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());
|
Map<TimeUnit, Long> diff = computeDiff(date, System.currentTimeMillis());
|
||||||
if (OverviewFragment.shorttextmode)
|
|
||||||
if(diff.get(TimeUnit.DAYS) > threshold)
|
if(diff.get(TimeUnit.DAYS) > threshold)
|
||||||
return "isOLD"+diff.get(TimeUnit.DAYS) +"d" + diff.get(TimeUnit.HOURS) + "h";
|
return true;
|
||||||
else
|
else
|
||||||
return diff.get(TimeUnit.DAYS) +"d" + diff.get(TimeUnit.HOURS) + "h";
|
return false;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String log() {
|
public String log() {
|
||||||
|
|
Loading…
Reference in a new issue