diff --git a/src/sedrot.js b/src/sedrot.js index 572e331..d1f51dc 100644 --- a/src/sedrot.js +++ b/src/sedrot.js @@ -13,9 +13,13 @@ import dayjs from 'dayjs'; const VEZOT_HABERAKHAH = 'Vezot Haberakhah'; +const YEARS_PRE = 3; +const YEARS_TOTAL = 24; + const options15yr = { - year: new Date().getFullYear() - 2, - numYears: 18, + year: new HDate().getFullYear() - YEARS_PRE, + isHebrewYear: true, + numYears: YEARS_TOTAL, noHolidays: true, sedrot: true, }; @@ -35,9 +39,9 @@ function simchatTorahDate(hyear, il) { } function makeVezotEvents(il) { - const startYear = new HDate().getFullYear() - 2; + const startYear = new HDate().getFullYear() - YEARS_PRE; const events = []; - for (let i = 0; i < 18; i++) { + for (let i = 0; i < YEARS_TOTAL; i++) { const hyear = startYear + i; const hd = simchatTorahDate(hyear, il); const pe = new ParshaEvent(hd, [VEZOT_HABERAKHAH], il); diff --git a/views/parsha-detail.ejs b/views/parsha-detail.ejs index 565f20f..d0fbe15 100644 --- a/views/parsha-detail.ejs +++ b/views/parsha-detail.ejs @@ -232,6 +232,7 @@ Some congregations read the entire parsha every year (“Option A”). <% } // books %> +<% if (items.length) { -%>

List of Dates

@@ -239,11 +240,11 @@ Parashat <%=parshaName%> is read in <%=locationName%> on:
-<% for (let i = 0; i < 3; i++) { -%> -
-
+<% } // items.length -%>
@@ -273,7 +275,7 @@ Parashat <%=parshaName%> is read in <%=locationName%> on:

References

<% if (typeof summary === 'object') { %> -
Parashat <%=parshaName%> from Sefaria.org +
Parashat <%=parsha.p1||parshaName%> from Sefaria.org
Sefaria, Inc. <% } %> <% if (commentary['asin']) { %>