public class HolidayCalendar
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
HolidayCalendar.Holiday |
Constructor | Description |
---|---|
HolidayCalendar() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Date |
findCanadianThanksgiving(int year) |
Find the Canadian Thanksgiving of the year
|
static java.util.Date |
findChristmas(int year) |
Find the date on which Christmas occurs, at the year
|
static java.util.Date |
findCivicDay(int year) |
Find the Civic holiday of the year
|
static java.util.Date |
findDaylightSavingDate(int year) |
Find the date of the year when Daylight Saving Time starts
|
static java.util.Date |
findDaylightSavingOffDate(int year) |
Find the date of the year when Daylight Saving Time ends
|
static java.util.Date |
findEasterDate(int year) |
Find the Easter date of the year
|
static java.util.Date |
findFamilyDay(int year) |
Find the family day of the year
|
static java.util.Date |
findFathersDay(int year) |
Find the Father's day of the year
|
static java.util.Date |
findFirstDayOfWeekInMonth(int year,
int month,
int dayOfWeek) |
Find the first specified day of week, at a given month and year
|
static java.util.Date |
findHolidayAfterDate(HolidayCalendar.Holiday holiday,
java.util.Date date) |
Find the date that a given holiday occurs
|
static java.util.Date |
findHolidayOfYear(HolidayCalendar.Holiday holiday,
int year) |
Find the date that a given holiday occurs, in the given year
|
static java.util.Date |
findLaborDay(int year) |
Find the Labor day of the year
|
static java.util.Date |
findMothersDay(int year) |
Find the Mother's day of the year
|
static java.util.Date |
findNDayOfWeekInMonth(int year,
int month,
int dayOfWeek,
int rank) |
Date date = findNDayOfWeekInMonth(2018, 5, Calendar.SUNDAY, 2)
return the 2nd Sunday of May (5th month) 2018
|
static java.util.Date |
findNewYearDay(int year) |
Find the new Year's date of the year
|
static java.util.Date |
findNextHoliday(HolidayCalendar.Holiday holiday) |
Find the next occurrence of a given holiday
|
static java.util.Date |
findSaintJeanBaptisteDay(int year) |
Find the Saint-Jean Baptiste day of the year
|
static java.util.Date |
findSaintPatrickDay(int year) |
Find the Saint Patrick's day of the year
|
static java.util.Date |
findSaintValentineDay(int year) |
Find the Valentine day of the year
|
static java.util.Date |
findSecondDayOfWeekInMonth(int year,
int month,
int dayOfWeek) |
Find the second specified day of week, at a given month and year
|
static java.util.Date |
findThirdDayOfWeekInMonth(int year,
int month,
int dayOfWeek) |
Find the third specified day of week, at a given month and year
|
public static java.util.Date findNextHoliday(HolidayCalendar.Holiday holiday)
holiday
- to findpublic static java.util.Date findHolidayAfterDate(HolidayCalendar.Holiday holiday, java.util.Date date)
holiday
- to findpublic static java.util.Date findHolidayOfYear(HolidayCalendar.Holiday holiday, int year)
holiday
- to findpublic static java.util.Date findNewYearDay(int year)
year
- public static java.util.Date findSaintValentineDay(int year)
year
- public static java.util.Date findFamilyDay(int year)
year
- public static java.util.Date findSaintPatrickDay(int year)
year
- public static java.util.Date findDaylightSavingDate(int year)
year
- public static java.util.Date findEasterDate(int year)
year
- public static java.util.Date findMothersDay(int year)
year
- public static java.util.Date findFathersDay(int year)
year
- public static java.util.Date findSaintJeanBaptisteDay(int year)
year
- public static java.util.Date findCivicDay(int year)
year
- public static java.util.Date findLaborDay(int year)
year
- public static java.util.Date findCanadianThanksgiving(int year)
year
- public static java.util.Date findDaylightSavingOffDate(int year)
year
- public static java.util.Date findChristmas(int year)
year
- public static java.util.Date findFirstDayOfWeekInMonth(int year, int month, int dayOfWeek)
year
- month
- month
- public static java.util.Date findSecondDayOfWeekInMonth(int year, int month, int dayOfWeek)
year
- month
- month
- public static java.util.Date findThirdDayOfWeekInMonth(int year, int month, int dayOfWeek)
year
- month
- month
- public static java.util.Date findNDayOfWeekInMonth(int year, int month, int dayOfWeek, int rank)
year
- month
- dayOfWeek
- rank
-