Code example for GregorianCalendar

Methods: clear, hashCode, set

0
                TimeZone.getTimeZone("Europe/London"), 
                new Locale("en", "GB")); 
        g.clear(); 
        g.setTimeInMillis(1222185600225L); 
 
        GregorianCalendar g1 = new GregorianCalendar( 
                TimeZone.getTimeZone("Europe/Moscow")); 
        g1.clear(); 
        g1.set(2008, Calendar.SEPTEMBER, 23, 18, 0, 0); 
        assertNotSame(g.hashCode(), g1.hashCode()); 
    } 
 
    public void test_setFirstDayOfWeekI() { 
        GregorianCalendar g = new GregorianCalendar( 
                TimeZone.getTimeZone("Europe/London"), 
                new Locale("en", "GB")); 
 
        for (int i = 0; i < 10; i++) { 
            g.setFirstDayOfWeek(i); 
            assertEquals(i, g.getFirstDayOfWeek()); 
        }