Here you can find the source of parseDate(final String date)
Parameter | Description |
---|---|
date | a parameter |
Parameter | Description |
---|---|
ParseException | an exception |
static Date parseDate(final String date) throws ParseException
//package com.java2s; /*/*from www .j ava 2s .c o m*/ * libChEBIj (c) University of Manchester 2015 * * libChEBIj is licensed under the MIT License. * * To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. */ import java.text.*; import java.util.*; public class Main { /** * */ private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); /** * * @param date * @return parsed Date object * @throws ParseException */ static Date parseDate(final String date) throws ParseException { return dateFormat.parse(date); } }