From 1493895428d5aa6715dfea74353fefd1896cb75a Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 10 Aug 2014 19:45:04 -0700 Subject: [PATCH] add utility date formatting functions --- .../src/org/eehouse/android/xw4/DbgUtils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java index 4e024e3f5..fcff97a66 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java @@ -145,6 +145,18 @@ public class DbgUtils { } } + public static String secondsToDateStr( long seconds ) + { + return millisToDateStr( seconds * 1000 ); + } + + public static String millisToDateStr( long millis ) + { + Time tim = new Time(); + tim.set( millis ); + return tim.format2445(); + } + // public static String toString( long[] longs ) // { // String[] asStrs = new String[longs.length];