Update ParkingPositionPlugin.java
This commit is contained in:
parent
7567a1b3ae
commit
4785845d3b
1 changed files with 3 additions and 7 deletions
|
@ -526,13 +526,9 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
String getFormattedTime(long timeInMillis) {
|
String getFormattedTime(long timeInMillis) {
|
||||||
Time time = new Time();
|
java.text.DateFormat dateFormat = DateFormat.getMediumDateFormat(app);
|
||||||
time.set(timeInMillis);
|
java.text.DateFormat timeFormat = DateFormat.getTimeFormat(app);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm dd.MM.yyyy", Locale.getDefault());
|
return timeFormat.format(timeInMillis) + " " + dateFormat.format(timeInMillis);
|
||||||
if (!DateFormat.is24HourFormat(app)) {
|
|
||||||
sdf = new SimpleDateFormat("hh:mm a dd.MM.yyyy", Locale.getDefault());
|
|
||||||
}
|
|
||||||
return sdf.format(new Date(time.toMillis(false)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getFormattedTimeInterval(long timeInMillis, Activity ctx) {
|
String getFormattedTimeInterval(long timeInMillis, Activity ctx) {
|
||||||
|
|
Loading…
Reference in a new issue