Here you can find the source of parseDateString(String dateStr, String pattern, Locale locale)
public static Date parseDateString(String dateStr, String pattern, Locale locale)
//package com.java2s; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static Date parseDateString(String dateStr, String pattern) { return parseDateString(dateStr, pattern, Locale.getDefault()); }/* ww w . ja v a 2s . com*/ public static Date parseDateString(String dateStr, String pattern, Locale locale) { SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, locale); return dateFormat.parse(dateStr, new ParsePosition(0)); } }