Code example for DateFormatSymbols

Methods: equalssetAmPmStringssetEras

        assertTrue("Set incorrectly", newSym.equals(symbols));
        assertTrue("Not a clone", f1.getDateFormatSymbols() != symbols);
        String result = f1.format(new GregorianCalendar(1999, Calendar.JUNE,
                12, 3, 0).getTime());
        assertEquals("Incorrect symbols used", "morning", result);
        symbols.setEras(new String[] { "before", "after" });
        assertTrue("Identical symbols", !f1.getDateFormatSymbols().equals(
        try { 
            fail("NullPointerException was not thrown.");
        } catch(NullPointerException npe) {
    public void test_toLocalizedPattern() { 
        // BEGIN android-changed 
        // Test for method java.lang.String 
        // java.text.SimpleDateFormat.toLocalizedPattern() 
Connect your IDE to all the code out there  Get Codota for Java