WebCab Options and Futures Demo v2.5 (J2SE Edition)

## webcab.lib.calendar.cities
Class BusinessCalendarTimeConversions

    java.lang.Object
      |
      +--webcab.lib.calendar.cities.BusinessCalendarTimeConversions

public class BusinessCalendarTimeConversions
extends Object

This utility class uses the functionality provided by any given `BusinessCalendar` implementation in order to compute the number of day or years between two given sets of dates. It also provides specialized methods for internal computations.

See Also:
  `BusinessCalendar`

Method Summary
`static double` `accruedInterest(double marketPrice, Date previousCouponPaymentDate, Date evaluationDate, Date settlementDate, Date[] couponPaymentDates, Date maturityDate, double[] couponPayments, String dayCountConvention)` This method recalculates the target price of a bond by taking into account the accrued interest.
`static double` `daysBetweenAsDouble(Date startDate, Date endDate, BusinessCalendar businessCalendar)` This method returns the number of days between two given dates as a rational number ( a `double` value ).
`static double` `daysBetweenAsDouble(Date startDate, Date endDate, String businessCalendar)` This method returns the number of days between two given dates as a rational number ( a `double` value ).
`static double` `yearsBetweenAsDouble(Date startDate, Date endDate, BusinessCalendar businessCalendar)` This method returns the number of years between two given dates as a rational number ( a `double` value ).
`static double` `yearsBetweenAsDouble(Date startDate, Date endDate, String businessCalendar)` This method returns the number of years between two given dates as a rational number ( a `double` value ).
`static double[]` `yearsBetweenAsDoubleArray(Date startDate, Date[] endDates, BusinessCalendar businessCalendar)` This method returns the number of years between a fixed date and a set of dates as a set of rational numbers ( a `double[]` array ).
`static double[]` `yearsBetweenAsDoubleArray(Date startDate, Date[] endDates, String businessCalendar)` This method returns the number of years between a fixed date and a set of dates as a set of rational numbers ( a `double[]` array ).
`static int` `yearsBetweenAsInteger(Date startDate, Date endDate, BusinessCalendar businessCalendar)` This method returns the number of years between two given dates as an integer ( an `int` value ).
`static int` `yearsBetweenAsInteger(Date startDate, Date endDate, String businessCalendar)` This method returns the number of years between two given dates as an integer ( an `int` value ).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### yearsBetweenAsDouble

    public static double yearsBetweenAsDouble(Date startDate,
                                              Date endDate,
                                              BusinessCalendar businessCalendar)

  This method returns the number of years between two given dates as a rational number ( a `double` value ).

### yearsBetweenAsDouble

    public static double yearsBetweenAsDouble(Date startDate,
                                              Date endDate,
                                              String businessCalendar)

  This method returns the number of years between two given dates as a rational number ( a `double` value ).

### yearsBetweenAsInteger

    public static int yearsBetweenAsInteger(Date startDate,
                                            Date endDate,
                                            BusinessCalendar businessCalendar)

  This method returns the number of years between two given dates as an integer ( an `int` value ).

### yearsBetweenAsInteger

    public static int yearsBetweenAsInteger(Date startDate,
                                            Date endDate,
                                            String businessCalendar)

  This method returns the number of years between two given dates as an integer ( an `int` value ).

### yearsBetweenAsDoubleArray

    public static double[] yearsBetweenAsDoubleArray(Date startDate,
                                                     Date[] endDates,
                                                     BusinessCalendar businessCalendar)

  This method returns the number of years between a fixed date and a set of dates as a set of rational numbers ( a `double[]` array ). The set describes the end dates. This method tries to return an array of `double` values which correspond to the given fixed start date - end dates pairs.

### yearsBetweenAsDoubleArray

    public static double[] yearsBetweenAsDoubleArray(Date startDate,
                                                     Date[] endDates,
                                                     String businessCalendar)

  This method returns the number of years between a fixed date and a set of dates as a set of rational numbers ( a `double[]` array ). The set describes the end dates. This method tries to return an array of `double` values which correspond to the given fixed start date - end dates pairs.

### daysBetweenAsDouble

    public static double daysBetweenAsDouble(Date startDate,
                                             Date endDate,
                                             BusinessCalendar businessCalendar)

  This method returns the number of days between two given dates as a rational number ( a `double` value ).

### daysBetweenAsDouble

    public static double daysBetweenAsDouble(Date startDate,
                                             Date endDate,
                                             String businessCalendar)

  This method returns the number of days between two given dates as a rational number ( a `double` value ).

### accruedInterest

    public static double accruedInterest(double marketPrice,
                                         Date previousCouponPaymentDate,
                                         Date evaluationDate,
                                         Date settlementDate,
                                         Date[] couponPaymentDates,
                                         Date maturityDate,
                                         double[] couponPayments,
                                         String dayCountConvention)

  This method recalculates the target price of a bond by taking into account the accrued interest.

WebCab Options and Futures Demo v2.5 (J2SE Edition)