de.pangaea.metadataportal.utils
Class ISODateFormatter

java.lang.Object
  extended by de.pangaea.metadataportal.utils.ISODateFormatter

public final class ISODateFormatter
extends Object

Simple static class to create and parse ISO-8601 date stamps (used by OAI harvester): The used date formats are:

Author:
Uwe Schindler

Method Summary
static String formatLong(Date date)
          Formats a long date.
static String formatLong(long date)
          Formats a long date.
static String formatShort(Date date)
          Formats a short date.
static String formatShort(long date)
          Formats a short date.
static Date parseDate(String date)
          Parses the given string into a Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseDate

public static Date parseDate(String date)
                      throws ParseException
Parses the given string into a Date. It accepts short and long dates (with time)

Throws:
ParseException

formatLong

public static String formatLong(Date date)
Formats a long date.


formatLong

public static String formatLong(long date)
Formats a long date.


formatShort

public static String formatShort(Date date)
Formats a short date.


formatShort

public static String formatShort(long date)
Formats a short date.



Copyright ©2007-2011 panFMP Developers c/o Uwe Schindler