X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2Fdeletebydate%2FDateInfo.java;h=3e36d75a448491d5de056a9ddf6833655c85d67b;hp=0c2cedb54f5743af654466f8afdb06399916a4e4;hb=92dad5df664287acb51728e9ea599f150765d34a;hpb=81843c3d8d0771bf00d0f26034a13aa515465c78 diff --git a/tim/prune/function/deletebydate/DateInfo.java b/tim/prune/function/deletebydate/DateInfo.java index 0c2cedb..3e36d75 100644 --- a/tim/prune/function/deletebydate/DateInfo.java +++ b/tim/prune/function/deletebydate/DateInfo.java @@ -2,6 +2,7 @@ package tim.prune.function.deletebydate; import java.text.DateFormat; import java.util.Date; +import java.util.TimeZone; /** * Class to hold the information about a date, @@ -12,7 +13,7 @@ public class DateInfo implements Comparable { /** Date, or null for no date - used for earlier/later comparison */ private Date _date = null; - /** String representation of date, for equality comparison */ + /** String representation of date */ private String _dateString = null; /** Number of points with this date */ private int _numPoints = 0; @@ -22,6 +23,15 @@ public class DateInfo implements Comparable // Doesn't really matter what format is used here, as long as dates are different private static final DateFormat DEFAULT_DATE_FORMAT = DateFormat.getDateInstance(); + + /** + * @param inZone Timezone to use for the date identification + */ + public static void setTimezone(TimeZone inZone) + { + DEFAULT_DATE_FORMAT.setTimeZone(inZone); + } + /** * Constructor * @param inDate date object from timestamp @@ -47,10 +57,10 @@ public class DateInfo implements Comparable } /** - * @return date object, or null + * @return string representation of date */ - public Date getDate() { - return _date; + public String getString() { + return _dateString; } /**