Package org.springframework.format.datetime.joda

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


      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

Related Classes of org.springframework.format.datetime.joda.DateTimeParser

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.