public class CalendarPeriodCountCalculator extends Object implements PeriodCountCalculator<Calendar>
Calendar
based implementation of the
PeriodCountCalculator
.Constructor and Description |
---|
CalendarPeriodCountCalculator() |
Modifier and Type | Method and Description |
---|---|
int |
dayDiff(Calendar start,
Calendar end,
PeriodCountBasis basis)
This calculates the number of days between 2 dates, it follows the given
basis which means that the result could vary between the same 2 dates if
the basis is different.
|
double |
monthDiff(Calendar start,
Calendar end,
PeriodCountBasis basis)
This calculates the number of months (or fraction) between 2 dates, it
follows the given basis which means that the result could vary between
the same 2 dates if the basis is different.
|
double |
yearDiff(Calendar start,
Calendar end,
PeriodCountBasis basis)
This calculates the number of years (or fraction) between 2 dates, it
follows the given basis which means that the result could vary between
the same 2 dates if the basis is different.
|
public int dayDiff(Calendar start, Calendar end, PeriodCountBasis basis)
PeriodCountCalculator
dayDiff
in interface PeriodCountCalculator<Calendar>
start
- the start dateend
- the end datebasis
- the basis to usepublic double monthDiff(Calendar start, Calendar end, PeriodCountBasis basis)
PeriodCountCalculator
monthDiff
in interface PeriodCountCalculator<Calendar>
start
- the start dateend
- the end datebasis
- the basis to usepublic double yearDiff(Calendar start, Calendar end, PeriodCountBasis basis)
PeriodCountCalculator
yearDiff
in interface PeriodCountCalculator<Calendar>
start
- the start dateend
- the end datebasis
- the basis to useCopyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.