org.apache.myfaces.html5.renderkit.input.util
Class Html5DateTimeFormatUtils

java.lang.Object
  extended by org.apache.myfaces.html5.renderkit.input.util.Html5DateTimeFormatUtils

public class Html5DateTimeFormatUtils
extends Object

Utility class for parsing and formatting date values.

Author:
Ali Ok

Method Summary
static String formatDateTime(Date value, String type)
          Formats datetime for given type.
static Date parseDateTime(String value, String type)
          Parses the value and converts it to date time considering the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseDateTime

public static Date parseDateTime(String value,
                                 String type)
                          throws ParseException
Parses the value and converts it to date time considering the type.

Throws:
ParseException - if the input is not parsable for the given type.

formatDateTime

public static String formatDateTime(Date value,
                                    String type)
                             throws javax.faces.FacesException
Formats datetime for given type.

Throws:
javax.faces.FacesException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.