List of utility methods to do Time to String
String | timeToFullString(long time) time To Full String String returnTime = ""; long temp; if (time / ONE_WEEK_IN_MILISECONDS > 0) { temp = time / ONE_WEEK_IN_MILISECONDS; String week = (temp > 1) ? temp + " weeks " : temp + " week "; returnTime += week; temp = (time - temp * ONE_WEEK_IN_MILISECONDS) / ONE_DAY_IN_MILISECONDS; String day = (temp > 1) ? temp + " days " : temp + " day "; ... |
String | timeToFullString(long time, boolean longNames) time To Full String long s, m, h, d, w; String line = "", _s = "s ", _m = "m ", _h = "h ", _d = "d ", _w = "w ", clock = "%d%s"; if (longNames) { _s = " second(s) "; _m = " minute(s) "; _h = " hour(s) "; _d = " day(s) "; _w = " week(s) "; ... |
String | timeToStr(int time) time To Str return new SimpleDateFormat(STAND_DATE_TIME).format(new Date(time * 1000L)); |
String | timeToStr(String time) time To Str char[] timeArray = time.toCharArray(); char[] timeList = new char[timeArray.length]; int j = 0; for (int i = 0; i < timeArray.length; i++) { if (timeArray[i] == '-' || timeArray[i] == ' ' || timeArray[i] == ':') { continue; } else { timeList[j] = timeArray[i]; ... |
String | timeToString(Calendar date) time To String return dateToString(date, FORMAT_TIME);
|
String | timeToString(Date d, String tzString) time To String DateFormat df = (DateFormat) DateFormat.getTimeInstance(DateFormat.SHORT).clone(); if (tzString != null) df.setTimeZone(TimeZone.getTimeZone(tzString)); return df.format(d); |
String | timeToString(Date date) time To String SimpleDateFormat sdf = new SimpleDateFormat(TIME_PARTTEN); return sdf.format(date); |
String | timeToString(double d) time To String if (d == NO_DATA_D) { return "No Data"; } else { int minutes = ((int) d) / 60; int seconds = ((int) d) - (minutes * 60); return String.valueOf(minutes) + ":" + String.valueOf(seconds); |
String | timeToString(double time, boolean longNames) time To String String error = NEGATIVE, clock = "%.2f%s"; String _s = "s", _m = "m", _h = "h", _d = "d", _w = "w"; if (longNames) { _s = " second(s)"; _m = " minute(s)"; _h = " hour(s)"; _d = " day(s)"; _w = " week(s)"; ... |
String | timeToString(final Date date) Time to string. String result = ""; result = TIME.format(date); return result; |