The JewcalGetNearestHolidayHebrewDate function gets the
next occurence of a holiday of the current/given date.
If the current/given date directly falls on a holiday, then the same date is returned.
An exception is if the current/given date falls on the second day of the holiday -
in this case the first day of the holiday is returned.
DWORD JewcalGetNearestHolidayHebrewDate(BOOL fDiaspora, BOOL fPostponeShushanPurim, LPSTR lpNameFile, LPJEWCALDATE lpHebrewDate, LPJEWCALDATE lpReturnHebrewDate, int iReturnHoliday);
If it is TRUE, calculation for Diaspora is used.
If it is FALSE, calculation for Israel is used. |
If it is TRUE and when the 15th of Adar in a non-leap year or
the 15th of Adar II in a leap year falls on a Saturday, Shushan
Purim is postponed to Sunday.
If it is FALSE, Shushan Purim is always calculated on the 15th of Adar in a non-leap year or the 15th of Adar II in a leap year. |
If it is not NULL, it must point to the filename with full path of
the NAMES.TXT file.
If it is NULL, the NAMES.TXT file is assumed to have its original name and present in the same directory where JEWCAL.DLL is located. File format of NAMES.TXT |
If it is not NULL, it must point to a JEWCALDATE structure which specifies the Hebrew date to process. If it is NULL, the current date is used. |
Must point to a JEWCALDATE structure in which the date of the nearest holiday is returned. |
This variable must contain the type of the holiday (JEWCAL_DAY_...) to return |
Value | Meaning |
---|---|
JEWCAL_DAY_HOLIDAY | Holiday |
JEWCAL_DAY_YOMHAZICARON | Yom-Hazicaron day |
JEWCAL_DAY_FAST | Fast day |
If the function succeeds, the return value is JEWCAL_ERROR_OK.
If the function fails, the return value is other than JEWCAL_ERROR_OK. The function fails if the passed Hebrew date is invalid or if the NAMES.TXT file could not be found.
This function is new in version 1.1