Examples of ReadablePartialPrinter


Examples of org.springframework.format.datetime.joda.ReadablePartialPrinter

      @Override
      public LocalDate convert(DateTime source) {
        return source.toLocalDate();
      }
    });
    formattingService.addFormatterForFieldType(LocalDate.class, new ReadablePartialPrinter(DateTimeFormat
        .shortDate()), new DateTimeParser(DateTimeFormat.shortDate()));
    String formatted = formattingService.convert(new LocalDate(2009, 10, 31), String.class);
    assertEquals("10/31/09", formatted);
    LocalDate date = formattingService.convert("10/31/09", LocalDate.class);
    assertEquals(new LocalDate(2009, 10, 31), date);
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.