com.ephox.date
Class DateUtils

java.lang.Object
  extended by com.ephox.date.DateUtils

public class DateUtils
extends Object

Provides access to the date formatting functions EditLive! uses, allowing plugins to use the same format.

Since:
7.5

Method Summary
static String getReadableDate(Date date)
          Format a Date object into a human readable string using the locale default formatter.
static String getXMLDate(Date date)
          Format a Date object into a string using the format yyyy-MM-dd'T'HH:mm:ssZ.
static Date parseXMLDate(String string)
          Parse a String into a Date object using the format yyyy-MM-dd'T'HH:mm:ssZ.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getReadableDate

public static String getReadableDate(Date date)
Format a Date object into a human readable string using the locale default formatter.

Returns:
formatted date

getXMLDate

public static String getXMLDate(Date date)
Format a Date object into a string using the format yyyy-MM-dd'T'HH:mm:ssZ.

Returns:
String representation of date

parseXMLDate

public static Date parseXMLDate(String string)
Parse a String into a Date object using the format yyyy-MM-dd'T'HH:mm:ssZ.

Returns:
parsed Date value, or null if the string could not be parsed

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.