JewcalGetJewishHolidayName

The JewcalGetJewishHolidayName function retrieves the name of the holiday which falls on a Gregorian date. If you also want to know the weekday of the holiday and if the holiday is the first or second day (if the holiday is Rosh HaShanah or has a second day in the Diaspora) use JewcalGetJewishHolidayNameEx

DWORD JewcalGetJewishHolidayName(LPJEWCALDATE lpGregorianDate,
                                 BOOL fDiaspora,
                                 BOOL fPostponeShushanPurim,
                                 LPTSTR lpString, UINT cbMax,
                                 LPTSTR lpLanguage,
                                 LPTSTR lpNameFile);

Parameters

lpGregorianDate
If it is not NULL, it must point to a JEWCALDATE structure which specifies the Gregorian date for which the Jewish holiday must be determined.
If it is NULL, the current date is used.

fDiaspora
If it is TRUE, calculation for Diaspora is used.
If it is FALSE, calculation for Israel is used.

fPostponeShushanPurim
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.

lpString
Must point to a string buffer which will contain the name of the Jewish holiday after execution of this function. If no Jewish holiday falls on the given Gregorian date, an empty string is returned.

cbMax
Must contain the size of the buffer lpString in characters.

lpLanguage
If it is not NULL, it must point to a language defined in NAMES.TXT.
If it is NULL, the entry with no language, that means without a dot, is retrieved if present (by default, not).

lpNameFile
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

Return values

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 Gregorian date is invalid or the buffer is too small.

See Also

JewcalGetJewishHolidayNameEx, JEWCALDATE, Calculated Jewish holidays