Android Date String Parse parseDateString(String dateStr, String pattern, Locale locale)

Here you can find the source of parseDateString(String dateStr, String pattern, Locale locale)

Description

parse Date String

Declaration

public static Date parseDateString(String dateStr, String pattern,
             Locale locale) 

Method Source Code

//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));
    }
}

Related

  1. parseDate(String date)
  2. parseDate(String date)
  3. parseDate(String rawDate)
  4. parseDateStr(String dateStr, String srcPattern, String destPattern)
  5. parseDateString(String dateStr, String pattern)
  6. parseSimpleDate(String dateString)
  7. parseUTCFormattedDateString(String dateString)
  8. parseYoutubeDate(String rawDate)
  9. stringToDate(String str)