Java Second Get getSeconds(String time)

Here you can find the source of getSeconds(String time)

Description

get Seconds

License

Open Source License

Declaration

public static int getSeconds(String time) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int getSeconds(String time) {
        String[] timeTmp = getTimeFromString(time);
        return Integer.parseInt(timeTmp[2].substring(0, timeTmp[2].indexOf(".")));
    }/*w w w  . j  ava 2s  .com*/

    private static String[] getTimeFromString(String time) {
        String[] tmp = time.split(" ");
        String[] time_tmp = tmp[4].split(":");
        return time_tmp;
    }
}

Related

  1. getSeconds(double seconds)
  2. getSeconds(double t)
  3. getSeconds(final double DEC_DEG)
  4. getSeconds(int minutes)
  5. getSeconds(String s)
  6. getSeconds(String time, int defaultValue)
  7. getSecondsAsClock(int time)
  8. getSecondsByDays(int days)
  9. getSecondsForShortString(String string)