public interface IDateUtil
Define common Date/Calendar operations
- 導入されたバージョン:
- 1.0.0
- バージョン:
- 1.1.0
- 作成者:
- yui-KITAMURA
-
ネストされたクラスの概要
ネストされたクラス -
メソッドの概要
修飾子とタイプメソッド説明fromStr
(String input, IDateUtil.Formats format) now()
Get Calendar instance of current DateTime.toStr
(Calendar calendar, IDateUtil.Formats format) String formatter withIDateUtil.Formats
toStr
(Date date, IDateUtil.Formats format) String formatter withIDateUtil.Formats
-
メソッドの詳細
-
now
Get Calendar instance of current DateTime.- 戻り値:
- instance of current DateTime
-
toDate
- パラメータ:
calendar
- original instance of Calendar- 戻り値:
- the Date instance that has same timestamp with parameter
-
toCal
- パラメータ:
date
- original instance of Date- 戻り値:
- the Calendar instance that has same timestamp with parameter
-
toStr
@Contract("null, null -> fail; null, _ -> null; !null, _ -> new") String toStr(Calendar calendar, IDateUtil.Formats format) String formatter withIDateUtil.Formats
- パラメータ:
calendar
- Calendar instance to be formattedformat
- the output format that you want to get- 戻り値:
- the string value which the argument of calendar formatted with selected format
-
toStr
@Contract("null, null -> fail; null, _ -> null; !null, _ -> new") String toStr(Date date, IDateUtil.Formats format) String formatter withIDateUtil.Formats
- パラメータ:
date
- Date instance to be formattedformat
- the output format that you want to get- 戻り値:
- the string value which the argument of date formatted with selected format
-
fromStr
@Contract("null, null -> fail; null, _ -> null; !null, _ -> new") Calendar fromStr(String input, IDateUtil.Formats format) - パラメータ:
input
- convert target textformat
- the text format- 戻り値:
- the Calendar instance which has the time given with the input
- 例外:
IllegalArgumentException
- when failed to convert- 導入されたバージョン:
- 1.1.0
-
toTS
- パラメータ:
calendar
- original Calendar instance- 戻り値:
- the Timestamp instance that has same DateTime with argument
-
toTS
- パラメータ:
date
- original Date instance- 戻り値:
- the Timestamp instance that has same DateTime with argument
-