Here you can find the source of parseDateWithoutTime(final String date)
public static Date parseDateWithoutTime(final String date)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import com.google.common.base.Strings; public class Main { public static final DateFormat DEFAULT_DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy"); public static Date parseDateWithoutTime(final String date) { return parseDateWithoutTime(date, false); }//from w ww . j a v a 2 s . c o m public static Date parseDateWithoutTime(final String date, final boolean permissive) { final Date res = null; if (!permissive || !Strings.isNullOrEmpty(date)) { try { return DEFAULT_DATE_FORMAT.parse(date); } catch (final ParseException e) { if (!permissive) { throw new RuntimeException("Error when parsing date : " + date, e); } } } return res; } }