question: public static Calendar toCalendar ( String datestring , String format ) { Date d = parse ( datestring , format ) ; Calendar cal = Calendar . getInstance ( ) ; cal . setTimeInMillis ( d . getTime ( ) ) ; return cal ; }
target:  Returns a calendar from a given string using the provided format.