List of utility methods to do Second Get
String | getSecondsText(long seconds) get Seconds Text if (seconds == 0) return (" seconds"); return ((seconds > 1 ? " seconds" : " second")); |
String | getSecondsToHHMMSS(double seconds) get Seconds To HHMMSS long seg = Math.round(seconds); long hh = seg / 3600; seg = seg % 3600; long mm = seg / 60; seg = seg % 60; return (hh < 10 ? "0" : "") + hh + ":" + (mm < 10 ? "0" : "") + mm + ":" + (seg < 10 ? "0" : "") + seg; |
String | getSecondsToMMSS(double seconds) get Seconds To MMSS long seg = (int) Math.round(seconds); if (seg >= 3600) return getSecondsToHHMMSS(seconds); long mm = seg / 60; seg = seg % 60; return (mm < 10 ? "0" : "") + mm + ":" + (seg < 10 ? "0" : "") + seg; |
String | getSecondTime() get Second Time return String.valueOf(System.currentTimeMillis()).substring(0, 10);
|
long | getSecondTime(String time) get Second Time long rt = 0; if (time != null) { String[] times = time.split(":"); if (times.length == 3) { rt = Long.parseLong(times[0]) * 3600 + Long.parseLong(times[1]) * 60 + Long.parseLong(times[2]); return rt; ... |
int | getSecondToLastIndexOf(String string, char character) get Second To Last Index Of String temp = string.substring(0, string.lastIndexOf(character));
return temp.lastIndexOf(character);
|
String | getSecondVersion(String buildId) get Second Version String[] items = buildId.split("\\."); return items[1]; |
double | getSYNTimeSeconds() get the SYN time in seconds. return 0.01;
|
String | getTextBeforeFirstAndSecondColumns(String s) get Text Before First And Second Columns if (null == s) return NULL_STRING; int i1 = s.indexOf(58); if (-1 == i1) return s; int i2 = s.indexOf(58, i1 + 1); if (-1 == i2) return s.substring(i1 + 1); ... |
long | getTimeAsSeconds(String value) A time can be passed in as a long in millis, or with a unit on it, like '60s'. return getTimeAsMillis(value) / 1000;
|