jp.finaluna.api.type.util
インタフェース DateUtil


@Rcsid(value="$Revision: 15138 $ $Date: 2009-01-17 02:38:48 +0900 $")
public interface DateUtil

日付系のユーティリティクラス。

バージョン:
$Revision: 15138 $ $Date: 2009-01-17 02:38:48 +0900 $
作成者:
NTTデータ

入れ子のクラスの概要
static class DateUtil.Calendar
          日付フィールド(列挙型)。
static class DateUtil.DayBoundary
          日付計算 端入コード(列挙型)。
static class DateUtil.DayCountFraction
          日付計算方法(列挙型)。
static class DateUtil.DayOfWeek
          曜日(列挙型)
static class DateUtil.DayOfWeekInMonth
          月内曜日序数(列挙型)。
 
フィールドの概要
static IntegerType D_1
           値 1。
static IntegerType D_12
           値 12。
static IntegerType D_15
           値 15。
static IntegerType D_2
           値 2。
static IntegerType D_360
           値 360。
static IntegerType D_365
           値 365。
static IntegerType D_366
           値 366。
static IntegerType D_M1
           値 -1。
static IntegerType D_M2
           値 -2。
 
メソッドの概要
 DateAndTimeType getDateTime(DateType date, TimeType time)
          日付時刻型取得 日付型と時刻型を用いて日付時刻型を作成する。
 IntegerType getDays(DateType start, DateType end, DateUtil.DayBoundary boundary)
          期間計算(日数) 指定した日付間の実日数を返す。
 IntegerType getDays(DateType start, DateType end, DateUtil.DayBoundary boundary, DateUtil.DayCountFraction fraction)
          期間計算(日数) 指定した日付間の日数を返す。
 DateType getNthDayByWeekday(DateType baseDate, DateUtil.DayOfWeekInMonth inMonth, DateUtil.DayOfWeek week)
          第n、Y曜日取得 基準日の月の第n、Y曜日に対応する日付を取得する。
 DecimalType getYears(DateType start, DateType end, DateUtil.DayBoundary boundary, DateUtil.DayCountFraction fraction)
          期間計算(年数) 指定した日付の期間(年数)を返す。
 

フィールドの詳細

D_1

static final IntegerType D_1

値 1。


D_2

static final IntegerType D_2

値 2。


D_M1

static final IntegerType D_M1

値 -1。


D_M2

static final IntegerType D_M2

値 -2。


D_12

static final IntegerType D_12

値 12。


D_15

static final IntegerType D_15

値 15。


D_360

static final IntegerType D_360

値 360。


D_365

static final IntegerType D_365

値 365。


D_366

static final IntegerType D_366

値 366。

メソッドの詳細

getDays

IntegerType getDays(DateType start,
                    DateType end,
                    DateUtil.DayBoundary boundary,
                    DateUtil.DayCountFraction fraction)
期間計算(日数)

指定した日付間の日数を返す。

パラメータ:
start - 開始日
end - 終了日
boundary - 境界値条件
fraction - 日付計算方法
戻り値:
IntegerType 日数

getDays

IntegerType getDays(DateType start,
                    DateType end,
                    DateUtil.DayBoundary boundary)
期間計算(日数)

指定した日付間の実日数を返す。

パラメータ:
start - 開始日
end - 終了日
boundary - 境界値条件
戻り値:
IntegerType 日数

getYears

DecimalType getYears(DateType start,
                     DateType end,
                     DateUtil.DayBoundary boundary,
                     DateUtil.DayCountFraction fraction)
期間計算(年数)

指定した日付の期間(年数)を返す。

パラメータ:
start - 開始日
end - 終了日
boundary - 境界値条件
fraction - 日付計算方法
戻り値:
DecimalType 日付間の年数

getNthDayByWeekday

DateType getNthDayByWeekday(DateType baseDate,
                            DateUtil.DayOfWeekInMonth inMonth,
                            DateUtil.DayOfWeek week)
第n、Y曜日取得

基準日の月の第n、Y曜日に対応する日付を取得する。

パラメータ:
baseDate - 基準日
inMonth - 月内曜日序数
week - 曜日
戻り値:
DateType 結果日付

getDateTime

DateAndTimeType getDateTime(DateType date,
                            TimeType time)
日付時刻型取得

日付型と時刻型を用いて日付時刻型を作成する。 日付型の年月日フィールドと時刻型の時分秒をマージする。

パラメータ:
date - 日付
time - 時刻
戻り値:
DateAndTimeType 日付時刻