Object toType(String value,String pattern,Locale locale){
  Calendar calendar=toCalendar(value,pattern,locale);
  return toType(calendar);
}

Object toType ( String value , String pattern , Locale locale ) { Calendar calendar = toCalendar ( value , pattern , locale ) ; return toType ( calendar ) ; }
parse a string value to the required type
