package test; import javatextParseException; import javatextSimpleDateFormat; import javautilDate; import javautilLocale; public class DateFormat { public static void main(String[] args) throws ParseException { javatextDateFormat df = new SimpleDateFormat(dd MMM yyyy HH:mm:ss zzz LocaleENGLISH) Date d = dfparse( Dec :: CST) Systemoutprintln(dtoLocaleString()) javatextDateFormat df = new SimpleDateFormat(EEE MMM dd HH:mm:ss zzz yyyy LocaleENGLISH) d = dfparse(Sun Jan :: CST ) Systemoutprintln(dtoLocaleString()) } } |