public class DateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Date |
addMonth(Date addTo)
add a month to the date.
|
static int |
differenceInMonths(Calendar beginningDate,
Calendar endingDate)
calculate difference in months between the arguments.
|
static int |
differenceInMonths(Date beginningDate,
Date endingDate)
calculate difference in months between the arguments.
|
static Date |
getAfterDate(List<Date> dateList,
Date refDate)
get next date after reference date.
|
static Date |
getBeforeDate(List<Date> dateList,
Date refDate)
get previous date before reference date.
|
public static int differenceInMonths(Date beginningDate, Date endingDate)
beginningDate
- begin datumendingDate
- eind datumdifferenceInMonths(java.util.Calendar, java.util.Calendar)
public static int differenceInMonths(Calendar beginningDate, Calendar endingDate)
beginningDate
- begin datumendingDate
- eind datumpublic static Date addMonth(Date addTo)
addTo
- begin datumpublic static Date getAfterDate(List<Date> dateList, Date refDate)
dateList
- list of datesrefDate
- reference date, must be part of dateList
refDate
from dateList
or reference date if there are no later datespublic static Date getBeforeDate(List<Date> dateList, Date refDate)
dateList
- list of datesrefDate
- reference date, must be part of dateList
refDate
from dateList
or reference date if there are no earlier datesCopyright © 2023 B3partners. All rights reserved.