Here you can find the source of parseMillisecond(String date)
public static int parseMillisecond(String date)
//package com.java2s; //License from project: Open Source License public class Main { public static int parseMillisecond(String date) { String[] tt = date.split("[^\\d]+"); int ms = 0; for (int i = 0; i < tt.length - 1; i++) { ms = ms * 60 + getInt(tt[i]); }//from w ww.j a v a 2s .c o m ms = ms * 1000 + getInt(tt[tt.length - 1]); return ms; } public static int getInt(String s) { if (s != null) { try { return Integer.parseInt(s); } catch (NumberFormatException e) { System.err.println("Util.getInt(s): " + e.getMessage()); } } return 0; } }