Code example for GregorianCalendar

Methods: getgetTimeZone

0
	 *        int, int) 
	 */ 
	public void test_ConstructorIIIIII() { 
		// Test for method java.util.GregorianCalendar(int, int, int, int, int, 
		// int) 
		GregorianCalendar gc = new GregorianCalendar(1972, Calendar.OCTOBER,
				13, 19, 9, 59); 
		assertEquals("Incorrect calendar constructed",
				1972, gc.get(Calendar.YEAR));
		assertTrue("Incorrect calendar constructed",
				gc.get(Calendar.MONTH) == Calendar.OCTOBER);
		assertEquals("Incorrect calendar constructed", 13, gc
				.get(Calendar.DAY_OF_MONTH));
		assertEquals("Incorrect calendar constructed", 7, gc.get(Calendar.HOUR));
		assertEquals("Incorrect calendar constructed",
				1, gc.get(Calendar.AM_PM));
		assertEquals("Incorrect calendar constructed",
				9, gc.get(Calendar.MINUTE));
		assertEquals("Incorrect calendar constructed",
				59, gc.get(Calendar.SECOND));
		assertTrue("Incorrect calendar constructed", gc.getTimeZone().equals(
				TimeZone.getDefault()));
	} 
 
	/** 
	 * @tests java.util.GregorianCalendar#GregorianCalendar(java.util.Locale) 
Connect your IDE to all the code out there  Get Codota for Java