Package com.skaringa.util

Examples of com.skaringa.util.ISO8601DateFormat.format()


   */
  public void testFormat() {
    Calendar cal = new GregorianCalendar(1962, 0, 19);
    cal.setTimeZone(TimeZone.getTimeZone("GMT+01"));
    ISO8601DateFormat formatter = new ISO8601DateFormat();
    String res = formatter.format(cal.getTime());

    assertEquals(
      "ISO 8601 date formatter produces wrong output",
      "1962-01-19",
      res);
View Full Code Here


    Iterator it = calendars.iterator();
    while (it.hasNext()) {
      Calendar cal = (Calendar) it.next();
      Date date = cal.getTime();

      String serial = formatter.format(date);

      ParsePosition pos = new ParsePosition(0);
      Date parsedDate = formatter.parse(serial, pos);
      assertNotNull(
        "Parsing of " + serial + " failed at position " + pos.getIndex(),
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.