8000 Zemanim tweaks by aperomsik · Pull Request #119 · hebcal/hebcal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Zemanim tweaks #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions hebcal.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,36 @@ void print_candlelighting_times( int mask, int weekday, date_t todayGreg)
for (i_zman = 0; i_zman < num_zmanim; i_zman ++)
{
double var_hour;
int min_offset;
char *name;

if ( (zemanim[i_zman].flags & mask) == 0 )
continue;

var_hour = zemanim[i_zman].variable_hour;
min_offset = zemanim[i_zman].min_offset;

if ((zemanim[i_zman].flags == ZMAN_MINCHA_GEDOLA) &&
var_hr_hours < 1)
{
/* In the winter, when half a solar hour is less than 30
minutes, some authorities use 30 minutes after noon
instead of 6.5 solar hours. See Shaar HaTziyun 233:8 and
other sources quoted at http://judaism.stackexchange.com/a/25738.
myzemanim.com also appears to calculate this way.*/
var_hour = 6.0;
min_offset = 30;
}

if (var_hour < 12.0)
{
N = h_rise + var_hour * var_hr_hours;
n_offset = (zemanim[i_zman].min_offset) / 60.0;
n_offset = min_offset / 60.0;
}
else
{
N = h_set + (var_hour - 12) * var_hr_hours;
n_offset = (zemanim[i_zman].min_offset) / 60.0;
n_offset = min_offset / 60.0;
}

N += gmt_offset;
Expand Down Expand Up @@ -450,7 +464,7 @@ void main_calendar( long todayAbs, long endAbs) /* the range of the desired prin
today_zemanim |= (day_of_week == SAT) ?
ZMAN_CANDLES_AFTER : ZMAN_CANDLES_BEFORE;
else
if ((returnedMask & CHUL_ONLY) &&
if ((returnedMask & LIGHT_CANDLES_TZEIS) &&
! (returnedMask & YOM_TOV_ENDS))
today_zemanim |= ZMAN_CANDLES_AFTER;
}
Expand Down
11 changes: 6 additions & 5 deletions holidays.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ holinput_t inp_holidays[] =
{
{TISHREI, 15, IGNORE_YEAR},
{"Sukkot I", "Sukkos I", "\361\345\353\345\372 \351\345\355 \340'"},
CHUL_ONLY,
CHUL_ONLY|LIGHT_CANDLES_TZEIS,
NULL
},
{
Expand Down Expand Up @@ -125,7 +125,7 @@ holinput_t inp_holidays[] =
{
{TISHREI, 22, IGNORE_YEAR},
{"Shmini Atzeret", "Shmini Atzeres", "\371\356\351\360\351 \362\366\370\372"},
CHUL_ONLY,
CHUL_ONLY|LIGHT_CANDLES_TZEIS,
NULL
},
{
Expand Down Expand Up @@ -192,7 +192,7 @@ holinput_t inp_holidays[] =
{
{NISAN, 15, IGNORE_YEAR},
{"Pesach I", NULL, "\364\361\347 \351\345\355 \340'"},
CHUL_ONLY,
CHUL_ONLY|LIGHT_CANDLES_TZEIS,
NULL
},
{
Expand Down Expand Up @@ -241,7 +241,7 @@ holinput_t inp_holidays[] =
{
{NISAN, 21, IGNORE_YEAR},
{"Pesach VII", NULL, "\364\361\347 \351\345\355 \346'"},
CHUL_ONLY,
CHUL_ONLY|LIGHT_CANDLES_TZEIS,
NULL
},
{
Expand Down Expand Up @@ -280,7 +280,7 @@ holinput_t inp_holidays[] =
{
{SIVAN, 6, IGNORE_YEAR},
{"Shavuot I", "Shavuos I", "\371\341\345\362\345\372 \351\345\355 \340'"},
CHUL_ONLY,
CHUL_ONLY|LIGHT_CANDLES_TZEIS,
NULL
},
{
Expand Down Expand Up @@ -950,6 +950,7 @@ int getHebHolidays( date_t dth, holstorep_t *holiList )
iso8859_8_sw ? "\370\340\371 \344\371\360\344" :
"Rosh Hashana",
dth.yy);
tmpholip->typeMask = LIGHT_CANDLES_TZEIS;
PushHoliday (tmpholip, &var_holidays[TISHREI][1]);
tmpMask |= PushHoliday (tmpholip, holiList);
}
Expand Down
0