JEWCALTIME

The JEWCALTIME structure contains required information for the JewcalCalculateTime function.

typedef struct tagJEWCALTIME
{
  DWORD cbSize;
  DWORD dwFlags;

  LPTSTR lpCityFile;
  LPTSTR lpCity;

  TCHAR chLatitude;
  int iLatitudeDeg;
  int iLatitudeMin;
  TCHAR chLongitude;
  int iLongitudeDeg;
  int iLongitudeMin;
  int iTimeZone;

  LPTSTR lpCalculation;

  LPTSTR lpTimeFileName;
  LPTSTR lpTimeInFile;

  JEWCALDATE date;

  LPJEWCALDST lpDST;

  int iReturnHour;
  int iReturnMin;
} JEWCALTIME;
typedef JEWCALTIME FAR* LPJEWCALTIME;

Members

cbSize
Must contain the size of this structure, sizeof(JEWCALTIME) before calling JewcalCalculateTime.

dwFlags

The required flags (JEWCALTIME_CITY/JEWCALTIME_COORDS and JEWCALTIME_CALCDIRECT/JEWCALTIME_CALCFILE) can be combined with the OR (|) operator.

One of the following two flags must be present to specify the city for time calculation:

  • JEWCALTIME_CITY:
    • lpCityFile: If it is not NULL, it must contain the filename with full path of the CITIES.TXT file where the cities definitions are contained. If it is NULL, the default CITIES.TXT file is used which must be present in the same directory where the JEWCAL.DLL is located. File format of CITIES.TXT
    • lpCity: Name of the city which must be present in the cities definitions file specified by lpCityFile.
  • JEWCALTIME_COORDS:
    • chLatitude: Must be either N (Nothern Latitude) or S (Southern Latitude)
    • iLatitudeDeg: Degrees of the latitude which must be in the range -65 to 65
    • iLatitudeMin: Minutes of the latitude which must be in the range 0 to 59
    • chLongitude: Must be either W (Western Longitude) or E (Eastern Longitude)
    • iLongitudeDeg: Degrees of the longitude which must be in the range -179 to 179
    • iLongitudeMin: Minutes of the longitude which must be in the range 0 to 59
    • iTimeZone: Hours relative to Greenwich Mean Time (GMT) - range -11 to 12

One of the following two flags must be present to specify the calculation method:

  • JEWCALTIME_CALCDIRECT:
  • JEWCALTIME_CALCFILE:
    • lpTimeFileName: If it is not NULL, it must contain the filename with full path of the ZMANIM.TXT file where the Zmanim definitions are contained. If it is NULL, the default ZMANIM.TXT file is used which must be present in the same directory where the JEWCAL.DLL is located. File format of ZMANIM.TXT
    • lpTimeInFile: Must be a pointer to the identifer of the time in ZMANIM.TXT which should be calculated.

date
This JEWCALDATE structure must contain the Gregorian date for which the time is to be calculated. If the day, month and year are all 0, the current date is taken.

lpDST
If it is NULL, no daylight savings time is considered.
If it is not NULL, it must point to a valid JEWCALDST structure which contains information about when daylight savings time start and end.

iReturnHour
After the function returns, it contains the hour of the calculated time or 0 if an error occured. The returned hour is in 24 hour clock format, that means the range of the returned hour is 0-23.

iReturnMin
After the function returns, it contains the minute of the calculated time or 0 if an error occured.

See Also

JewcalCalculateTime, JEWCALDATE, JEWCALDST