Code example for Time

Methods: parse

0
        t.parse("BLARGH");
    } 
 
    @Test 
    public void shouldHaveParseShort() throws Exception { 
        Time t = new Time();
        t.parse("20081013");
        assertEquals(2008, t.year);
        assertEquals(9, t.month);
        assertEquals(13, t.monthDay);
        assertEquals(0, t.hour);
        assertEquals(0, t.minute);
        assertEquals(0, t.second);
    } 
 
    @Test 
    public void shouldFormat() throws Exception { 
        Time t = new Time();
        assertEquals("Hallo epoch 01 1970 01", t.format("Hallo epoch %d %Y %d"));
    } 
Contextual code suggestions in your IDE  Get Codota for Java