Examples of LocalDateTime


Examples of org.joda.time.LocalDateTime

        return JodaLocalDateTimeUtil.titleString(f, dateTime);
    }

    @Override
    public String titleStringWithMask(final Object value, final String usingMask) {
        final LocalDateTime dateTime = (LocalDateTime) value;
        return JodaLocalDateTimeUtil.titleString(DateTimeFormat.forPattern(usingMask), dateTime);
    }
View Full Code Here

Examples of org.joda.time.LocalDateTime

    // EncoderDecoder
    // //////////////////////////////////////////////////////////////////

    @Override
    protected String doEncode(final Object object) {
        final LocalDateTime date = (LocalDateTime) object;
        return encode(date);
    }
View Full Code Here

Examples of org.joda.time.LocalDateTime

    // //////////////////////////////////////

   
    static LocalDateTime relativeDateTime(final LocalDateTime contextDate, final String str, final boolean add) {
        LocalDateTime relativeDate = contextDate;
        if (str.equals("")) {
            return contextDate;
        }

        try {
View Full Code Here

Examples of org.joda.time.LocalDateTime

    @Test
    public void givenLocalDateTypeWhenConvertingToJsonExpectValidString()
        throws Exception
    {
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( new LocalDateTime( "2020-03-04T13:23:00", DateTimeZone.UTC ), underTest );
        Object value = serializer.getRoot();
        assertEquals( "2020-03-04T13:23:00.000", value.toString());
    }
View Full Code Here

Examples of org.threeten.bp.LocalDateTime

    }

    @Test(dataProvider="printText")
    public void test_appendText2arg_print(TemporalField field, TextStyle style, int value, String expected) throws Exception {
        DateTimeFormatter f = builder.appendText(field, style).toFormatter(Locale.ENGLISH);
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        dt = dt.with(field, value);
        String text = f.format(dt);
        assertEquals(text, expected);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.