* @return パース結果.
* @throws IOException パース失敗.
*/
- public static String parse(String time) throws IOException {
+ public static long parse(String time) throws IOException {
final Matcher mNumber = PATTERN_NUMBER.matcher(time);
if (mNumber.matches()) {
- return time;
+ return Long.parseLong(time);
}
final Matcher mHMS = PATTERN_YYMMDD_HH_MM_SS.matcher(time);
str.append(":");
}
final Date date = fmt.parse(str.toString());
- return Long.toString(date.getTime() / 1000);
+ return date.getTime() / 1000;
} catch (ParseException ex) {
throw new IOException("Cannot parse wayback time: " + time, ex);
}
str.append(":");
}
final Date date = fmt.parse(str.toString());
- return Long.toString(date.getTime() / 1000);
+ return date.getTime() / 1000;
} catch (ParseException ex) {
throw new IOException("Cannot parse wayback time: " + time, ex);
}