add logging to SayWhen
authorEugene Crosser <crosser@average.org>
Fri, 3 Feb 2012 21:30:55 +0000 (01:30 +0400)
committerEugene Crosser <crosser@average.org>
Fri, 3 Feb 2012 21:30:55 +0000 (01:30 +0400)
src/org/average/whereami/SayWhen.java

index 21196ffe654d7df66c7d0138a18efddf1bec7031..154727e8ffa37e98cf002afe1dd2cdd44e3a80ba 100644 (file)
@@ -6,6 +6,8 @@ import android.util.Log;
 
 public class SayWhen {
 
+       final String TAG = getClass().getName();
+
        private String s_at;
        private String yesterday;
 
@@ -22,6 +24,8 @@ public class SayWhen {
                twhen.set(when);
                Boolean datechange = tnow.monthDay != twhen.monthDay;
                Long hoursago = (System.currentTimeMillis() - when) / 3600000;
+               Log.v(TAG, "datechange=" + datechange +
+                       " hoursago=" + hoursago);
                if (hoursago > 24) {
                        return s_at + twhen.format(" %H:%M %d/%m/%Y");
                } else if ((tnow.hour > 4 || hoursago > 12) && datechange) {