Impressum
Yahrzeit DLL
Version 1.1
Files
File |
Meaning |
doc\index.html |
Documentation |
README.txt |
Readme file |
YahrzeitCalc.dll |
Yahrzeit DLL |
YahrzeitCalc.h |
C header file for Yahrzeit DLL |
YahrzeitCalc.lib |
Import library file for Yahrzeit DLL,
suitable for Microsoft Visual C++ 6.0 |
YahrzeitTest.c |
C Test Program for Yahrzeit DLL |
YahrzeitCalc.dll API Reference
Functions
Numbering of the Jewish months
The YahrzeitCalculateFromString function calculates the Yahrzeit
events given a string with a Gregorian death dates for a specific range of
years.
int YahrzeitCalculateFromString(LPSTR lpParameters,
BOOL fSephardim,
LPSTR lpTextFileName);
The string has the following format:
mmddyyyySyyyyrr
Sample: 05042002a200720 = Death on 4th May (05)
2002 after sunset, calculation from 2007 for 20 years.
The day and month must be with leading zeroes.
The count of years do not have a leading zero and must be in the range of 1 to 99.
If the death occured before sunset, the letter "b" is coded in the String,
if it occured after sunset, the letter "a" is necessary.
Parameters
lpParameters
|
String which the date of death, whether it occured before or after
sunset and the range of years is coded in. More details see above. |
fSephardim
|
Specifies whether Yahrzeit should be calculated with sephardic method.
Sephardic people observe Yahrzeit in Adar II in leap years if the death
occured in Adar of a common year. |
lpTextFileName
|
The filename of the output file.
|
Result
Returns a Yahrzeit error code. See Error codes.
The YahrzeitCalculate function calculates the Yahrzeit events
given a Gregorian death date for a specific range of years.
The dates of the Yahrzeit are given in the format YYYY-MM-DD;JD;JM;JY,
where YYYY-MM-DD is the Gregorian date, JD the Jewish day,
JM the Jewish month name and JY the Jewish year.
int YahrzeitCalculate(int iGDeathDay, int iGDeathMonth,
int iGDeathYear, BOOL fAfterSunset,
BOOL fSephardim, int iStartGYear,
int iCountYears,
LPSTR lpTextFileName);
Parameters
iGDeathDay
|
The Gregorian day of the death of the person. |
iGDeathMonth
|
The Gregorian month of the death of the person. |
iGDeathYear
|
The Gregorian year of the death of the person. |
fAfterSunset
|
Specifies wheter the death occured after sunset or not. This is required
for correct determining the Jewish date of the death because a Jewish day
begins at sunset. |
fSephardim
|
Specifies whether Yahrzeit should be calculated with sephardic method.
Sephardic people observe Yahrzeit in Adar II in leap years if the death
occured in Adar of a common year.
|
iGStartYear
|
The year which the calculation should start in.
|
iCountYears
|
The number of years which the Yahrzeit should be calculated for.
|
lpTextFileName
|
The filename of the output file.
|
Result
Returns an yahrzeit error code. See Error codes.
This function converts a Gregorian date to a Jewish date.
A flag indicates if you want the Jewish date corresponding
to the portion of the Gregorian day which occurs
before or after sunset.
void YahrzeitGregorianToHebrew(LPSTR lpGregorianDate,
BOOL fAfterSunset,
LPSTR lpReturnHebrewDate);
Parameters
lpGregorianDate
|
This parameter must contain the Gregorian date to convert.
The date is in the MMDDYYYY format.
|
fAfterSunset
|
If set to FALSE, the Jewish date which occurs before sunset
of the Gregorian date is returned.
If set to TRUE, the Jewish date which occurs after sunset
of the Gregorian date is returned.
|
lpReturnHebrewDate
|
After the function returns, lpReturnJewishDate
will contain the converted Jewish date.
The date is in the MMDDYYYY format.
Numbering of the Jewish months
|
Result
The function does not have a return value.
This function converts a Jewish date to a Gregorian date.
A flag indicates if you want the Gregorian date corresponding
to the portion of the Jewish day which occurs
before or after midnight.
void YahrzeitHebrewToGregorian(LPSTR lpHebrewDate,
BOOL fAfterMidnight,
LPSTR lpReturnGregorianDate);
Parameters
lpHebrewDate
fAfterMidnight
|
If set to FALSE, the Gregorian date which occurs before midnight
of the Jewish date is returned.
If set to TRUE, the Gregorian date which occurs after midnight
of the Jewish date is returned.
|
lpReturnGregorianDate
|
After the function returns, lpReturnGregorianDate
will contain the converted Gregorian date.
The date is in the MMDDYYYY format.
|
Result
The function does not have a return value.
Returns YAHRZEIT_ERROR_OK (0) if the calculation and generation of
the text file was successful.
Otherwise, one of the following error codes are generated:
YAHRZEIT_ERROR_INVALID_GYEAR (1) |
The Gregorian year of the death wasn't in the range 1583 to 3000.
|
YAHRZEIT_ERROR_FILE_CREATION_FAILED (2) |
The text file could not be created, e.g. due to missing access rights.
|
YAHRZEIT_ERROR_CALCULATION_ERROR (3) |
Calculation of Yahrzeit failed e.g. due to invalid date.
|
YAHRZEIT_INVALID_STRING (4) |
The given String for the YahrzeitCalculateFromString
function is not valid.
|
The Jewish months are numbered in the DLL in the following way:
Month number | Month name |
1 | Nisan |
2 | Iyar |
3 | Sivan |
4 | Tammuz |
5 | Av |
6 | Elul |
7 | Tishri |
8 | Heshvan |
9 | Kislev |
10 | Tevet |
11 | Shevat |
12 | Adar (in non-leap years), Adar I (in leap years) |
13 | Adar II (in leap years) |
Copyright (©) by David Greve 2007/5767