List of utility methods to do Second
String | trimMiliSeconds(String time) trim Mili Seconds if (time.matches("[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9]") || time.matches( "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9]") || time.matches( "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9]")) { int index = time.indexOf('.'); return time.substring(0, index); return time; |
void | validateSecond(int second) validate Second if (second < 0 || second > 59) { throw new IllegalArgumentException("Invalid second (must be >= 0 and <= 59)."); |
String | valueOfSecond(long time) value Of Second long h = time / 3600; long m = (time % 3600) / 60; long s = (time % 3600) % 60; String value = h + "Basic_hour" + ":" + m + "Basic_min" + ":" + s + "Basic_sec"; return value; |