public static Calendar toCalendar ( String dateTimeString ) throws ParseException { Date date = toDate ( dateTimeString ) ; if ( date == null ) { return ( null ) ; } Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( date ) ; return ( cal ) ; }
Parses an ISO8601 formatted string a returns a Calendar instance .