Skip to content

Commit

Permalink
Yerushalmi Yomi
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Nov 22, 2022
1 parent 4361817 commit c7a18dd
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 36 deletions.
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/icalendar",
"version": "4.18.3",
"version": "4.18.4",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"keywords": [
"ical",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/hebcal/hebcal-icalendar/issues"
},
"dependencies": {
"@hebcal/core": "^3.45.5",
"@hebcal/rest-api": "^4.3.6",
"@hebcal/core": "^3.46.1",
"@hebcal/rest-api": "^4.3.7",
"murmurhash3": "^0.5.0"
},
"scripts": {
Expand Down Expand Up @@ -55,10 +55,10 @@
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-json": "^5.0.1",
"ava": "^5.1.0",
"eslint": "^8.27.0",
"eslint": "^8.28.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^4.0.0",
"jsdoc-to-markdown": "^7.1.1",
"rollup": "^3.3.0"
"rollup": "^3.4.0"
}
}
3 changes: 2 additions & 1 deletion src/icalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const CATEGORY = {
candles: 'Holiday',
dafyomi: 'Daf Yomi',
mishnayomi: 'Mishna Yomi',
yerushalmi: 'Yerushalmi Yomi',
havdalah: 'Holiday',
hebdate: null,
holiday: 'Holiday',
Expand Down Expand Up @@ -340,7 +341,7 @@ const torahMemoCache = new Map();

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

/**
Expand Down
32 changes: 32 additions & 0 deletions src/icalendar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,3 +633,35 @@ test('uid', (t) => {
const ical2 = new IcalEvent(new Event(new HDate(2, 'Cheshvan', 5782), 'Hello World'), {});
t.is(ical2.getUid(), 'hebcal-20211008-197683ce');
});

test('yerushalmi-yomi', (t) => {
const hd = new HDate(new Date(2022, 10, 15));
const options = {
start: hd,
end: hd,
noHolidays: true,
yerushalmi: true,
locale: 'ashkenazi',
};
const ev = HebrewCalendar.calendar(options)[0];
t.is(ev.getDesc(), 'Berakhot 2');
const ical = new IcalEvent(ev, options);
const lines = ical.toString().split('\r\n');
lines[1] = 'DTSTAMP:X';
lines[6] = 'UID:X';
const expected = [
'BEGIN:VEVENT',
'DTSTAMP:X',
'CATEGORIES:Yerushalmi Yomi',
'SUMMARY:Yerushalmi Berakhos 2',
'DTSTART;VALUE=DATE:20221115',
'DTEND;VALUE=DATE:20221116',
'UID:X',
'TRANSP:TRANSPARENT',
'X-MICROSOFT-CDO-BUSYSTATUS:FREE',
'X-MICROSOFT-CDO-ALLDAYEVENT:TRUE',
'CLASS:PUBLIC',
'END:VEVENT',
];
t.deepEqual(lines, expected);
});

0 comments on commit c7a18dd

Please sign in to comment.