org.slim3.commons.util
Class TimeUtil

java.lang.Object
  extended by org.slim3.commons.util.TimeUtil

public final class TimeUtil
extends Object

A utility class for Time.

Version:
3.0
Author:
higa

Method Summary
static String getPattern(Locale locale)
          Returns the pattern for the locale.
static String toString(Time value, String pattern)
          Converts the Time value to text.
static Time toTime(Object o)
          Converts the object to Time.
static Time toTime(String text, String pattern)
          Converts the text to Time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toTime

public static Time toTime(Object o)
Converts the object to Time.

Parameters:
o - the object
Returns:
the converted value

toTime

public static Time toTime(String text,
                          String pattern)
Converts the text to Time.

Parameters:
text - the text
pattern - the pattern for SimpleDateFormat
Returns:
the converted value

toString

public static String toString(Time value,
                              String pattern)
Converts the Time value to text.

Parameters:
value - the Time value
pattern - the pattern for SimpleDateFormat
Returns:
the converted value

getPattern

public static String getPattern(Locale locale)
Returns the pattern for the locale.

Parameters:
locale - the locale
Returns:
the pattern


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.