Code example for Time

Methods: format2445

0
        assertEquals("Hallo epoch 01 1970 01", t.format("Hallo epoch %d %Y %d"));
    } 
 
    @Test 
    public void shouldFormat2445() throws Exception { 
        Time t = new Time();
        assertEquals("19700101T000000", t.format2445());
    } 
 
    @Test 
    public void shouldFormat3339() throws Exception { 
        Time t = new Time("Europe/Berlin");
        assertEquals("1970-01-01T00:00:00.000+00:00", t.format3339(false));
        assertEquals("1970-01-01", t.format3339(true));
    } 
 
    @Test 
    public void testIsEpoch() throws Exception { 
        Time t = new Time();
        boolean isEpoch = Time.isEpoch(t);
        assertEquals(true, isEpoch);