org.apache.myfaces.tobago.internal.util
Class DateFormatUtils

java.lang.Object
  extended by org.apache.myfaces.tobago.internal.util.DateFormatUtils

public class DateFormatUtils
extends Object

This code is taken from myfaces core. TODO: Should be sharable (e.g. myfaces-commons).

Date: 06.11.2006 17:20:29


Method Summary
static String findPattern(javax.faces.convert.DateTimeConverter converter)
          Find a pattern for the converter.
static DateFormat getDateFormat(String type, String dateStyle, String timeStyle, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findPattern

public static String findPattern(javax.faces.convert.DateTimeConverter converter)
Find a pattern for the converter. Returns the pattern inside the converter, if any. Otherwise compute the pattern.

Returns:
the patter or null, if DateFormat.getDateInstance() returns no SimpleDateFormat.

getDateFormat

public static DateFormat getDateFormat(String type,
                                       String dateStyle,
                                       String timeStyle,
                                       Locale locale)


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.