Code example for Date

Methods: equals

0
            format.setTimeZone(SimpleTimeZone.getTimeZone(timeZoneId));
            format.applyPattern("z, zzzz");
            assertEquals("Test z for TimeZone : " + timeZoneId, expected1,
                    format.format(date));
 
            format.applyPattern("Z, ZZZZ");
            assertEquals("Test Z for TimeZone : " + timeZoneId, expected2,
                    format.format(date));
        } 
    } 
 
    /** 
     * java.text.SimpleDateFormat#SimpleDateFormat(java.lang.String, 
     *        java.text.DateFormatSymbols) 
     */ 
    public void test_ConstructorLjava_lang_StringLjava_text_DateFormatSymbols() { 
        // Test for method java.text.SimpleDateFormat(java.lang.String, 
        // java.text.DateFormatSymbols) 
        DateFormatSymbols symbols = new DateFormatSymbols(Locale.ENGLISH);
        symbols.setEras(new String[] { "Before", "After" });
        SimpleDateFormat f2 = new SimpleDateFormat("y'y'yy", symbols);