Code example for SimpleDateFormat

Methods: parse, setTimeZone

0
        protected String title;
        protected boolean isSpoiler = false;
    } 
 
    private static Date parseFullDate(final String date) {
        final SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
        ISO8601DATEFORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
        final String strippedDate = STRIP_DATE.matcher(date).replaceAll("+0$100");
        try { 
            return ISO8601DATEFORMAT.parse(strippedDate);
        } catch (ParseException e) {
            Log.e("OC11XMLParser.parseFullDate", e);
        } 
        return null; 
    } 
 
    private static Date parseDayDate(final String date) {
        final SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
        ISO8601DATEFORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
        final String strippedDate = STRIP_DATE.matcher(date).replaceAll("+0$100");
        try {