use DateUtil#agoString
This commit is contained in:
parent
3121fa3e84
commit
f9ed104fe3
|
@ -226,7 +226,7 @@ public class DanaRFragment extends SubscriberFragment {
|
||||||
Long agoMsec = System.currentTimeMillis() - pump.lastBolusTime.getTime();
|
Long agoMsec = System.currentTimeMillis() - pump.lastBolusTime.getTime();
|
||||||
double agoHours = agoMsec / 60d / 60d / 1000d;
|
double agoHours = agoMsec / 60d / 60d / 1000d;
|
||||||
if (agoHours < 6) // max 6h back
|
if (agoHours < 6) // max 6h back
|
||||||
lastBolusView.setText(DateUtil.timeString(pump.lastBolusTime) + " (" + DecimalFormatter.to1Decimal(agoHours) + " " + MainApp.sResources.getString(R.string.hoursago) + ") " + DecimalFormatter.to2Decimal(DanaRPump.getInstance().lastBolusAmount) + " U");
|
lastBolusView.setText(DateUtil.timeString(pump.lastBolusTime) + " " + DateUtil.sinceString(pump.lastBolusTime.getTime()) + " " + DecimalFormatter.to2Decimal(DanaRPump.getInstance().lastBolusAmount) + " U");
|
||||||
else lastBolusView.setText("");
|
else lastBolusView.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue