aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/LogEntry.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/LogEntry.java')
-rw-r--r--main/src/cgeo/geocaching/LogEntry.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java
index 31a9703..e03dc66 100644
--- a/main/src/cgeo/geocaching/LogEntry.java
+++ b/main/src/cgeo/geocaching/LogEntry.java
@@ -1,6 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.enumerations.LogType;
+import cgeo.geocaching.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -94,15 +95,6 @@ public final class LogEntry {
}
public int daysSinceLog() {
- final Calendar logDate = Calendar.getInstance();
- logDate.setTimeInMillis(date);
- logDate.set(Calendar.SECOND, 0);
- logDate.set(Calendar.MINUTE, 0);
- logDate.set(Calendar.HOUR, 0);
- final Calendar today = Calendar.getInstance();
- today.set(Calendar.SECOND, 0);
- today.set(Calendar.MINUTE, 0);
- today.set(Calendar.HOUR, 0);
- return (int) Math.round((today.getTimeInMillis() - logDate.getTimeInMillis()) / 86400000d);
+ return DateUtils.daysSince(date);
}
}