Jewish Calendar/Zmanim DLL
Version 1.1, build 13
By default, the program is installed in the directory C:\Program Files\JEWCALSDK
File | Meaning |
---|---|
DOCS\INDEX.HTML | Documentation |
JEWCAL.DLL | Jewish Calendar/Zmanim DLL |
JEWCAL.H | C Header file for Jewish Calendar/Zmanim DLL |
JEWCAL.LIB | Import library file for Jewish Calendar/Zmanim DLL, suitable for Microsoft Visual C++ 6.0 |
NAMES.TXT |
ANSI Text file with words for Jewish months, holidays, torah and haphtaroth readings
File format This file is used in the JewcalGetHebrewMonthName, JewcalGetJewishHolidayName, JewcalGetJewishHolidayNameEx, JewcalGetReading, JewcalGetReadingEx, JewcalGetNearestHolidayGregorianDate and JewcalGetNearestHolidayHebrewDate functions |
ZMANIM.TXT |
ANSI Text file with definitions for shabbat times and Zmanim
File format |
Syntax of calculation methods This file is used in the JewcalCalculateTime function and JEWCALTIME structure when the JEWCALTIME_CALCFILE flag is specified |
CITIES.TXT |
ANSI Text file with definitions for cities data
File format of CITIES.TXT This file is used in the JewcalCalculateTime function and JEWCALTIME structure when the JEWCALTIME_CITY flag is specified |
Structures passed to functions should be first filled with zeroes,
for example with the ZeroMemory Windows function.
Then the cbSize member, if present, should be set to the
size of the structure.
Finally the required members can be filled in.
Gregorian years must be in range 1583 to 3000, and Hebrew years in range 5360 to 5860.
When a function expects a buffer, the minimum size should be 256 characters.
Almost all functions (except JewcalGetErrorString)
return an DWORD error code (error codes JEWCAL_ERROR_...).
JEWCAL_ERROR_OK is returned on success, another code means failure.
The textual description of the error code can be got by the
function JewcalGetErrorString.
(New in version 1.1, build 3)
Besides referencing *.txt files by the filename with full path or NULL (for the standard location), the text file can be load into memory in advance and then referenced by an identifer - this has the advantage that the file is not loaded from disk again, but taken from memory.
The respective text file can be loaded into memory with
JewcalLoadTextFile(filename, id)
where filename is the name of the file with full path and id is a free chooseable identifer - this function returns an error code if the file could not be found.
Then, this text file can be referenced in functions which expect a filename by passing the id as the filename.
The text file associated with id can be freed with
JewcalFreeTextFile(id)
Example in C:
DWORD dwError; char szMonth[256]; dwError = JewcalLoadTextFile("C:\\MyPath\\names.txt", "MYID"); if (dwError == JEWCAL_ERROR_OK) { JewcalGetHebrewMonthName(7, 5763, szMonth, 256, "English", "MYID"); /* Now, the name Tishri is in szMonth */ JewcalGetHebrewMonthName(9, 5763, szMonth, 256, "English", "MYID"); /* Now, the name Kislev is in szMonth */ JewcalFreeTextFile("MYID"); } else MessageBox(NULL, "Error", "", MB_OK);