org.seasar.framework.util
クラス TimeConversionUtil

java.lang.Object
  拡張org.seasar.framework.util.TimeConversionUtil

public class TimeConversionUtil
extends Object

タイム用の変換ユーティリティです。

作成者:
higa

コンストラクタの概要
protected TimeConversionUtil()
          インスタンスを構築します。
 
メソッドの概要
static String convertShortPattern(String pattern)
          短いパターンに変換します。
static SimpleDateFormat getDateFormat(String s, Locale locale)
          日付フォーマットを返します。
static SimpleDateFormat getDateFormat(String s, String pattern, Locale locale)
          日付フォーマットを返します。
static String getPattern(Locale locale)
          日付パターンを返します。
static Time toTime(Object o)
          タイムに変換します。
static Time toTime(Object o, String pattern)
          タイムに変換します。
static Time toTime(String s, String pattern)
          タイムに変換します。
static Time toTime(String s, String pattern, Locale locale)
          タイムに変換します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TimeConversionUtil

protected TimeConversionUtil()
インスタンスを構築します。

メソッドの詳細

toTime

public static Time toTime(Object o)
タイムに変換します。

パラメータ:
o - 変換したいオブジェクト
戻り値:
タイム

toTime

public static Time toTime(Object o,
                          String pattern)
タイムに変換します。

パラメータ:
o - 変換したいオブジェクト
pattern - パターン
戻り値:
タイム

toTime

public static Time toTime(String s,
                          String pattern)
タイムに変換します。

パラメータ:
s - 文字列で表現した値
pattern - パターン
戻り値:
変換した値

toTime

public static Time toTime(String s,
                          String pattern,
                          Locale locale)
タイムに変換します。

パラメータ:
s - 文字列で表現した値
pattern - パターン
locale - ロケール
戻り値:
変換した値

getDateFormat

public static SimpleDateFormat getDateFormat(String s,
                                             String pattern,
                                             Locale locale)
日付フォーマットを返します。

パラメータ:
s - 文字列で表現した値
pattern - パターン
locale - ロケール
戻り値:
日付フォーマット

getDateFormat

public static SimpleDateFormat getDateFormat(String s,
                                             Locale locale)
日付フォーマットを返します。

パラメータ:
s - 文字列で表現した値
locale - ロケール
戻り値:
日付フォーマット

getPattern

public static String getPattern(Locale locale)
日付パターンを返します。

パラメータ:
locale -
戻り値:
日付パターン

convertShortPattern

public static String convertShortPattern(String pattern)
短いパターンに変換します。

パラメータ:
pattern - パターン
戻り値:
短いパターン


Copyright © 2004-2009 The Seasar Foundation. All Rights Reserved.