クラス DateUtils
java.lang.Object
org.thinkit.bot.filater.util.DateUtils
public final class DateUtils extends Object
It provides common functions for date operation.
- 導入されたバージョン:
- 1.0.0
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DateUtils()
-
メソッドの概要
修飾子とタイプ メソッド 説明 static Date
getDateAfter(DateFormat dateFormat, long timeMs, int days)
Returns the date represented bytimeMs
adddays
according to thedateFormat
passed as an argument.static Date
getDateAfter(DateFormat dateFormat, Date date, int days)
Returns thedate
adddays
according to thedateFormat
passed as an argument.static Date
now()
Returns the current date.static Date
toDate(DateFormat dateFormat, long timeMs)
Converts milliseconds to dates according todateFormat
passed as an argument and returns it.static String
toString(DateFormat dateFormat, Date date)
Converts date to string date according todateFormat
passed as an argument and returns it.
-
コンストラクタの詳細
-
DateUtils
public DateUtils()
-
-
メソッドの詳細
-
now
Returns the current date.- 戻り値:
- The current date
-
getDateAfter
Returns the date represented bytimeMs
adddays
according to thedateFormat
passed as an argument.- パラメータ:
dateFormat
- The date formattimeMs
- The date [ms]days
- The days to be added- 戻り値:
- The date that added
days
passed as an argument - 例外:
NullPointerException
- Ifnull
is passed as an argument
-
getDateAfter
Returns thedate
adddays
according to thedateFormat
passed as an argument.- パラメータ:
dateFormat
- The date formatdate
- The datedays
- The days to be added- 戻り値:
- The date that added
days
passed as an argument - 例外:
NullPointerException
- Ifnull
is passed as an argument
-
toDate
Converts milliseconds to dates according todateFormat
passed as an argument and returns it.- パラメータ:
dateFormat
- The date formattimeMs
- The milliseconds represents the date- 戻り値:
- The date
- 例外:
NullPointerException
- Ifnull
is passed as an argument
-
toString
Converts date to string date according todateFormat
passed as an argument and returns it.- パラメータ:
dateFormat
- The date formatdate
- The date- 戻り値:
- The string date
- 例外:
NullPointerException
- Ifnull
is passed as an argument
-