org.seasar.framework.util
クラス DateConversionUtil

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

public final class DateConversionUtil
extends Object

Date用の変換ユーティリティです。

作成者:
higa

メソッドの概要
static String findDelimiter(String value)
          日付のデリミタを探します。
static String findDelimiterFromPattern(String pattern)
          日付パターンから日付のデリミタを探します。
static SimpleDateFormat getDateFormat(Locale locale)
          SimpleDateFormatを返します。
static SimpleDateFormat getDateFormat(String s, Locale locale)
          SimpleDateFormatを返します。
static SimpleDateFormat getDateFormat(String s, String pattern, Locale locale)
          SimpleDateFormatを返します。
static String getPattern(Locale locale)
          日付パターンを返します。
static SimpleDateFormat getY4DateFormat(Locale locale)
          年4桁用のSimpleDateFormatを返します。
static String getY4Pattern(Locale locale)
          年4桁用の日付パターンを返します。
static String removeDelimiter(String pattern)
          日付パターンから日付のデリミタを取り除きます。
static Date toDate(Object o)
          Dateに変換します。
static Date toDate(Object o, String pattern)
          Dateに変換します。
static Date toDate(String s, String pattern)
          Dateに変換します。
static Date toDate(String s, String pattern, Locale locale)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

toDate

public static Date toDate(Object o)
Dateに変換します。

パラメータ:
o -
戻り値:
Date

toDate

public static Date toDate(Object o,
                          String pattern)
Dateに変換します。

パラメータ:
o -
pattern -
戻り値:
Date

toDate

public static Date toDate(String s,
                          String pattern)
Dateに変換します。

パラメータ:
s -
pattern -
戻り値:
Date

toDate

public static Date toDate(String s,
                          String pattern,
                          Locale locale)
パラメータ:
s -
pattern -
locale -
戻り値:

getDateFormat

public static SimpleDateFormat getDateFormat(String s,
                                             String pattern,
                                             Locale locale)
SimpleDateFormatを返します。

パラメータ:
s -
pattern -
locale -
戻り値:
SimpleDateFormat

getDateFormat

public static SimpleDateFormat getDateFormat(String s,
                                             Locale locale)
SimpleDateFormatを返します。

パラメータ:
s -
locale -
戻り値:
SimpleDateFormat

getDateFormat

public static SimpleDateFormat getDateFormat(Locale locale)
SimpleDateFormatを返します。

パラメータ:
locale -
戻り値:
SimpleDateFormat

getY4DateFormat

public static SimpleDateFormat getY4DateFormat(Locale locale)
年4桁用のSimpleDateFormatを返します。

パラメータ:
locale -
戻り値:
年4桁用のSimpleDateFormat

getY4Pattern

public static String getY4Pattern(Locale locale)
年4桁用の日付パターンを返します。

パラメータ:
locale -
戻り値:
年4桁用の日付パターン

getPattern

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

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

findDelimiter

public static String findDelimiter(String value)
日付のデリミタを探します。

パラメータ:
value -
戻り値:
日付のデリミタ

findDelimiterFromPattern

public static String findDelimiterFromPattern(String pattern)
日付パターンから日付のデリミタを探します。

パラメータ:
pattern -
戻り値:
日付のデリミタ

removeDelimiter

public static String removeDelimiter(String pattern)
日付パターンから日付のデリミタを取り除きます。

パラメータ:
pattern -
戻り値:
日付のデリミタを取り除いた後のパターン


Copyright ? 2004-2007 The Seasar Foundation. All Rights Reserved.