Skip to content

Commit

Permalink
flags.DAILY_LEARNING render brief. adjust chanukah candle-lighting time
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Feb 1, 2024
1 parent 3d2c4ac commit 81ad5d7
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 121 deletions.
225 changes: 114 additions & 111 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"url": "https://github.com/hebcal/hebcal-rest-api/issues"
},
"dependencies": {
"@hebcal/core": "^5.1.0",
"@hebcal/core": "^5.2.1",
"@hebcal/leyning": "^8.1.5",
"@hebcal/triennial": "^5.0.4"
},
Expand All @@ -45,16 +45,16 @@
},
"license": "BSD-2-Clause",
"devDependencies": {
"@hebcal/learning": "^5.0.2",
"@hebcal/learning": "^5.0.5",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"ava": "^6.0.1",
"ava": "^6.1.1",
"eslint": "^8.56.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^4.0.2",
"jsdoc-to-markdown": "^8.0.0",
"rollup": "^4.9.5"
"jsdoc-to-markdown": "^8.0.1",
"rollup": "^4.9.6"
}
}
2 changes: 1 addition & 1 deletion src/classic-rest-api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ test('chanukah-candles', (t) => {
const expected = [
{
title: 'Chanukah: 1 Candle',
date: '2020-12-10T16:43:00-05:00',
date: '2020-12-10T16:36:00-05:00',
category: 'holiday',
subcat: 'major',
hebrew: 'חנוכה: א׳ נר',
Expand Down
4 changes: 2 additions & 2 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export function getHolidayDescription(ev, firstSentence=false) {

const HOLIDAY_IGNORE_MASK = flags.DAF_YOMI | flags.OMER_COUNT |
flags.SHABBAT_MEVARCHIM | flags.MOLAD | flags.USER_EVENT |
flags.NACH_YOMI |
flags.NACH_YOMI | flags.DAILY_LEARNING |
flags.HEBREW_DATE | flags.YERUSHALMI_YOMI;

/**
Expand Down Expand Up @@ -349,7 +349,7 @@ export function shouldRenderBrief(ev) {
if (mask & flags.HEBREW_DATE) {
const hd = ev.getDate();
return (hd.getDate() === 1) ? false : true;
} else if (mask & (flags.DAF_YOMI | flags.YERUSHALMI_YOMI)) {
} else if (mask & (flags.DAILY_LEARNING | flags.DAF_YOMI | flags.YERUSHALMI_YOMI)) {
return true;
} else if (mask & flags.MINOR_FAST && ev.getDesc().substring(0, 16) === 'Yom Kippur Katan') {
return true;
Expand Down
3 changes: 3 additions & 0 deletions src/common.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ test('shouldRenderBrief', (t) => {
'Candle lighting: 8:15pm', flags.LIGHT_CANDLES,
new Date(), Location.lookup('Boston'))), true);
t.is(shouldRenderBrief(new DafYomiEvent(new HDate(25, 'Sivan', 5782))), true);
t.is(shouldRenderBrief(new Event(new HDate(25, 'Sivan', 5782), 'Foo Bar', flags.DAILY_LEARNING)), true);
t.is(shouldRenderBrief(new Event(new HDate(25, 'Sivan', 5782), 'Foo Bar', flags.CHAG)), false);
t.is(shouldRenderBrief(new Event(new HDate(25, 'Sivan', 5782), 'Foo Bar', 0)), false);
});

test('getDownloadFilename-nodate', (t) => {
Expand Down
2 changes: 1 addition & 1 deletion src/csv.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('chanukah-candles', (t) => {
};
const events = HebrewCalendar.calendar(options);
const csv = eventToCsv(events[0], options);
t.is(csv, '"Chanukah: 1 Candle","12/10/2020","4:43 PM","12/10/2020","4:43 PM","false","Hanukkah; the Jewish festival of rededication","4","Boston"');
t.is(csv, '"Chanukah: 1 Candle","12/10/2020","4:36 PM","12/10/2020","4:36 PM","false","Hanukkah; the Jewish festival of rededication","4","Boston"');
});

test('fastStartEnd', (t) => {
Expand Down
2 changes: 1 addition & 1 deletion src/fullcalendar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test('chanukah-candles', (t) => {
const expected = [
{
title: 'Chanukah: 1 Candle',
start: '2020-12-10T16:43:00-05:00',
start: '2020-12-10T16:36:00-05:00',
allDay: false,
className: 'holiday major',
hebrew: 'חנוכה: א׳ נר',
Expand Down

0 comments on commit 81ad5d7

Please sign in to comment.