Here you can find the source of parseDate(String d)
public static long parseDate(String d)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String DATE_FORMAT = "yyyy-MM-dd"; /**//from ww w. j a v a2 s . co m * Parse date like "yyyy-MM-dd". */ public static long parseDate(String d) { try { return new SimpleDateFormat(DATE_FORMAT).parse(d).getTime(); } catch (Exception e) { } return 0; } }