Skip to content

Commit

Permalink
Add short description for Yom Kippur Katan
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jun 24, 2022
1 parent cf5f651 commit feb4391
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/rest-api",
"version": "3.18.0",
"version": "3.19.0",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"keywords": [
"hebcal"
Expand All @@ -21,7 +21,7 @@
"url": "https://github.com/hebcal/hebcal-rest-api/issues"
},
"dependencies": {
"@hebcal/core": "^3.39.2",
"@hebcal/core": "^3.41.0",
"@hebcal/leyning": "^4.13.3"
},
"scripts": {
Expand All @@ -47,7 +47,7 @@
"@babel/preset-env": "^7.18.2",
"@babel/register": "^7.17.7",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"ava": "^4.3.0",
Expand Down
22 changes: 21 additions & 1 deletion src/common.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import test from 'ava';
import {getDownloadFilename, getCalendarTitle, makeTorahMemoText, getEventCategories,
getHolidayDescription,
appendIsraelAndTracking, locationToPlainObj} from './common';
import {HebrewCalendar, Location, Event, HDate, flags} from '@hebcal/core';
import {HebrewCalendar, Location, Event, HDate, flags, HolidayEvent} from '@hebcal/core';

test('getDownloadFilename', (t) => {
const location = new Location(38.672294, -90.533239, false, 'America/Chicago',
Expand Down Expand Up @@ -260,3 +261,22 @@ test('locationToPlainObj-none', (t) => {
t.deepEqual(locationToPlainObj(undefined), expected);
t.deepEqual(locationToPlainObj({}), expected);
});

test('getHolidayDescription-firstSentence', (t) => {
const ev = new HolidayEvent(new HDate(14, 'Nisan', 5784), 'Erev Pesach', flags.EREV);
t.is(getHolidayDescription(ev, true), 'Passover, the Feast of Unleavened Bread');
// eslint-disable-next-line max-len
t.is(getHolidayDescription(ev, false), 'Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt');
});

test('getHolidayDescription-ykk', (t) => {
const ev = new HolidayEvent(new HDate(29, 'Tevet', 5784), 'Yom Kippur Katan', flags.MINOR_FAST);
const s = getHolidayDescription(ev);
t.is(s, 'Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh');
});

test('getHolidayDescription-notfound', (t) => {
const ev = new Event(new HDate(3, 'Tevet', 5784), 'Foobar', flags.USER_EVENT);
const s = getHolidayDescription(ev);
t.is(s, '');
});
1 change: 1 addition & 0 deletions src/holidays.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"Yom HaShoah": "Holocaust Memorial Day",
"Yom HaZikaron": "Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat",
"Yom Kippur": "Day of Atonement",
"Yom Kippur Katan": "Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh",
"Yom Yerushalayim": "Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"
}

0 comments on commit feb4391

Please sign in to comment.