Skip to content

Commit

Permalink
geoname admin1 could be either "Jerusalem" or "Jerusalem District"
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael J. Radwin authored and Michael J. Radwin committed Jun 19, 2015
1 parent 261323a commit 8127204
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion local/bin/shabbat_weekly.pl
Expand Up @@ -586,7 +586,7 @@ sub parse_config {
}
$city_descr = Hebcal::geoname_city_descr($name,$admin1,$country);
$is_israel = 1 if $country eq "Israel";
$is_jerusalem = 1 if $is_israel && ($admin1 eq "Jerusalem District" || index($name, "Jerusalem") == 0);
$is_jerusalem = 1 if $is_israel && (index($admin1, "Jerusalem") == 0 || index($name, "Jerusalem") == 0);
} else {
ERROR("no geographic key in config for to=$to, id=$cfg->{id}");
return undef;
Expand Down
4 changes: 2 additions & 2 deletions local/share/perl/site_perl/Hebcal.pm
Expand Up @@ -1697,7 +1697,7 @@ sub process_args_common_geoname {
my $city_descr = geoname_city_descr($name,$admin1,$country);
if ($country eq "Israel") {
$q->param('i','on');
if ($admin1 eq "Jerusalem District"
if (index($admin1, "Jerusalem") == 0
|| index($name, "Jerusalem") == 0) {
$q->param('b','40');
}
Expand Down Expand Up @@ -1906,7 +1906,7 @@ sub process_args_common_city {
my $city_descr = geoname_city_descr($name,$admin1,$country);
if ($country eq "Israel") {
$q->param('i','on');
if ($admin1 eq "Jerusalem District"
if (index($admin1, "Jerusalem") == 0
|| index($name, "Jerusalem") == 0) {
$q->param('b','40');
}
Expand Down

0 comments on commit 8127204

Please sign in to comment.