Here you can find the source of getCalendarFromString(final String date)
public static Calendar getCalendarFromString(final String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import android.util.Log; public class Main { public static Calendar getCalendarFromString(final String date) { final SimpleDateFormat inputFormat = new SimpleDateFormat( "E, MMMM dd, yyyy"); Date parsedDate = new Date(); try {/*from ww w. ja v a 2s . com*/ parsedDate = inputFormat.parse(date.trim()); } catch (final ParseException e) { Log.e("DATE_PARSER", "Error: Impossible to parse input string to calendar.", e); throw new RuntimeException(e); } final Calendar currentDate = Calendar.getInstance(); currentDate.setTime(parsedDate); return currentDate; } }