forked from upstream-mirrors/OpenTracks
AggregatedStatisticsActivity: added filter option (by category, start and/or end date).
Fixes #1039.
This commit is contained in:
committed by
Román Martínez
parent
4d333bbafa
commit
b4ce99440a
@@ -29,6 +29,7 @@ import java.text.DecimalFormat;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@@ -61,6 +62,13 @@ public class StringUtils {
|
||||
+ " " + DateUtils.formatDateTime(context, time.toEpochMilli(), DateUtils.FORMAT_SHOW_TIME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the date and time based on user's phone date/time preferences.
|
||||
*/
|
||||
public static String formatDate(Context context, LocalDateTime localDateTime) {
|
||||
return DateUtils.formatDateTime(context, localDateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(), DateUtils.FORMAT_SHOW_DATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the time using the ISO 8601 date time format with fractional seconds in UTC time zone.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user