Package org.jboss.dna.graph.property.basic

Examples of org.jboss.dna.graph.property.basic.JodaDateTime


            return valueFactories.getDateFactory();
        }

        @Override
        protected Comparable<DateTime> parseValue( String s ) {
            return new JodaDateTime(s.trim());
        }
View Full Code Here


     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "" + numChanges + " changes by " + username + " at " + new JodaDateTime(timestampInUtc);
    }
View Full Code Here

            return valueFactories.getDateFactory();
        }

        @Override
        protected Comparable<DateTime> parseValue( String s ) {
            return new JodaDateTime(s.trim());
        }
View Full Code Here

        iso8601instance = "2008-05-10T13:22:04.678";
    }

    @Test
    public void shouldConstructWithIso8601FormattedStringWithoutZone() {
        instant = new JodaDateTime(iso8601instance, "UTC");
        assertThat(instant.getString(), startsWith(iso8601instance));
        assertThat(instant.getYearOfCentury(), is(8));
        assertThat(instant.getYear(), is(2008));
        assertThat(instant.getMonthOfYear(), is(5));
        assertThat(instant.getDayOfMonth(), is(10));
View Full Code Here

    }

    @Test
    public void shouldConstructWithIso8601FormattedString() {
        iso8601instance = "2008-05-10T13:22:04.678-04:00";
        instant = new JodaDateTime(iso8601instance);
        instant = (JodaDateTime)instant.toTimeZone("UTC");
        assertThat(instant.getString(), is("2008-05-10T17:22:04.678Z"));
        assertThat(instant.getYearOfCentury(), is(8));
        assertThat(instant.getYear(), is(2008));
        assertThat(instant.getMonthOfYear(), is(5));
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.property.basic.JodaDateTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.