@hebcal/core 3.50.4 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hebcal.d.ts CHANGED
@@ -29,6 +29,7 @@ declare module '@hebcal/core' {
29
29
  observedInDiaspora(): boolean;
30
30
  observedIn(il: boolean): boolean;
31
31
  clone(): Event;
32
+ getCategories(): string[];
32
33
  readonly date: Date;
33
34
  readonly desc: string;
34
35
  readonly mask: number;
@@ -522,6 +523,10 @@ declare module '@hebcal/core' {
522
523
  dd: number;
523
524
  };
524
525
 
526
+ export interface DailyLearningOptions {
527
+ [key: string]: any;
528
+ }
529
+
525
530
  /**
526
531
  * Options to configure which events are returned
527
532
  */
@@ -573,16 +578,6 @@ declare module '@hebcal/core' {
573
578
  noSpecialShabbat?: boolean;
574
579
  /** suppress regular holidays */
575
580
  noHolidays?: boolean;
576
- /** Babylonian Talmud Daf Yomi */
577
- dafyomi?: boolean;
578
- /** Jerusalem Talmud (Yerushalmi) Yomi */
579
- yerushalmi?: boolean;
580
- /** Use 1 for Vilna, 2 for Schottenstein */
581
- yerushalmiEdition?: number;
582
- /** include Mishna Yomi */
583
- mishnaYomi?: boolean;
584
- /** include Nach Yomi */
585
- nachYomi?: boolean;
586
581
  /** include Days of the Omer */
587
582
  omer?: boolean;
588
583
  /** include event announcing the molad */
@@ -617,6 +612,12 @@ declare module '@hebcal/core' {
617
612
  * Possible values are `true` and `false`; the default is locale dependent.
618
613
  */
619
614
  hour12?: boolean;
615
+ /**
616
+ * map of options to enable daily study calendars such as `dafYomi`, `mishnaYomi`,
617
+ * `nachYomi`, etc. with value `true`.
618
+ * For `yerushalmi` the value should be a `number` for edition (`1` for Vilna, `2` for Schottenstein).
619
+ */
620
+ dailyLearning?: DailyLearningOptions;
620
621
  };
621
622
 
622
623
  export type TachanunResult = {
@@ -802,24 +803,6 @@ declare module '@hebcal/core' {
802
803
  getChalakim(): number;
803
804
  }
804
805
 
805
- /**
806
- * Returns the Daf Yomi for given date
807
- */
808
- export class DafYomi {
809
- /**
810
- * Initializes a daf yomi instance
811
- * @param date Gregorian or Hebrew date
812
- */
813
- constructor(date: Date | HDate | number);
814
- getBlatt(): number;
815
- getName(): string;
816
- /**
817
- * Formats (with translation) the dafyomi result as a string like "Pesachim 34"
818
- * @param [locale] Optional locale name (defaults to active locale).
819
- */
820
- render(locale?: string): string;
821
- }
822
-
823
806
  /**
824
807
  * Gregorian date helper functions.
825
808
  */
@@ -1008,13 +991,6 @@ declare module '@hebcal/core' {
1008
991
  constructor(date: HDate, mask: number, eventTime: Date, location: Location, linkedEvent?: Event);
1009
992
  getEmoji(): string;
1010
993
  }
1011
- export class DafYomiEvent extends Event {
1012
- constructor(date: HDate);
1013
- render(locale?: string): string;
1014
- renderBrief(locale?: string): string;
1015
- url(): string;
1016
- readonly daf: DafYomi;
1017
- }
1018
994
  export class HavdalahEvent extends TimedEvent {
1019
995
  constructor(date: HDate, mask: number, eventTime: Date, location: Location, havdalahMins?: number, linkedEvent?: Event);
1020
996
  render(locale?: string): string;
@@ -1106,77 +1082,16 @@ declare module '@hebcal/core' {
1106
1082
  export function gematriya(number: number): string;
1107
1083
 
1108
1084
  /**
1109
- * Describes a mishna to be read
1110
- * @property k - tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan")
1111
- * @property v - verse (e.g. "2:1")
1085
+ * Daf Yomi, Mishna Yomi, Nach Yomi, etc.
1112
1086
  */
1113
- export type MishnaYomi = {
1114
- k: string;
1115
- v: string;
1116
- };
1117
- /**
1118
- * Initializes a Mishna Yomi instance
1119
- */
1120
- export class MishnaYomiIndex {
1087
+ export class DailyLearning {
1121
1088
  /**
1122
- * Looks up a Mishna Yomi
1123
- * @param date - Gregorian date
1089
+ * Register a new learning calendar.
1124
1090
  */
1125
- lookup(date: Date | HDate | number): MishnaYomi[];
1126
- }
1127
- /**
1128
- * Event wrapper around a Mishna Yomi instance
1129
- */
1130
- export class MishnaYomiEvent {
1131
- constructor(date: HDate, mishnaYomi: MishnaYomi[]);
1091
+ static addCalendar(name: string, calendar: Function): void;
1132
1092
  /**
1133
- * Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
1134
- * @param [locale] - Optional locale name (defaults to active locale).
1093
+ * Returns an event from daily calendar for a given date
1135
1094
  */
1136
- render(locale?: string): string;
1137
- /**
1138
- * Returns a link to sefaria.org
1139
- */
1140
- url(): string;
1141
- readonly mishnaYomi: MishnaYomi[];
1142
- }
1143
-
1144
- /**
1145
- * Using the Vilna edition, the Yerushalmi Daf Yomi program takes
1146
- * ~4.25 years or 51 months.
1147
- * Unlike the Daf Yomi Bavli cycle, this Yerushalmi cycle skips both
1148
- * Yom Kippur and Tisha B'Av (returning `null`).
1149
- * The page numbers are according to the Vilna
1150
- * Edition which is used since 1900.
1151
- *
1152
- * The Schottenstein edition uses different page numbers and takes
1153
- * ~6 years to complete.
1154
- *
1155
- * Throws an exception if the date is before Daf Yomi Yerushalmi
1156
- * cycle began (2 February 1980 for Vilna,
1157
- * 14 November 2022 for Schottenstein).
1158
- *
1159
- * @param date - Hebrew or Gregorian date
1160
- * @param config - either vilna or schottenstein
1161
- */
1162
- export function yerushalmiYomi(date: Date | HDate | number, config: any): any;
1163
- /** Yerushalmi Yomi configuration for Vilna Edition */
1164
- export const vilna: any;
1165
- /** Yerushalmi Yomi configuration for Schottenstein Edition */
1166
- export const schottenstein: any;
1167
-
1168
- /**
1169
- * Event wrapper around a Yerushalmi Yomi result
1170
- */
1171
- export class YerushalmiYomiEvent {
1172
- constructor(date: HDate, daf: any);
1173
- /**
1174
- * Returns name of tractate and page (e.g. "Yerushalmi Beitzah 21").
1175
- * @param [locale] - Optional locale name (defaults to active locale).
1176
- */
1177
- render(locale?: string): string;
1178
- renderBrief(locale?: string): string;
1179
- url(): string;
1180
- readonly daf: any;
1095
+ static lookup(name: string, hd: HDate): Event;
1181
1096
  }
1182
1097
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "3.50.4",
3
+ "version": "4.0.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -67,24 +67,24 @@
67
67
  "verbose": true
68
68
  },
69
69
  "devDependencies": {
70
- "@babel/core": "^7.21.0",
71
- "@babel/preset-env": "^7.20.2",
70
+ "@babel/core": "^7.21.4",
71
+ "@babel/preset-env": "^7.21.4",
72
72
  "@babel/register": "^7.21.0",
73
73
  "@hebcal/solar-calc": "^1.1.2",
74
74
  "@rollup/plugin-babel": "^6.0.3",
75
- "@rollup/plugin-commonjs": "^24.0.1",
75
+ "@rollup/plugin-commonjs": "^24.1.0",
76
76
  "@rollup/plugin-json": "^6.0.0",
77
- "@rollup/plugin-node-resolve": "^15.0.1",
78
- "@rollup/plugin-terser": "^0.4.0",
77
+ "@rollup/plugin-node-resolve": "^15.0.2",
78
+ "@rollup/plugin-terser": "^0.4.1",
79
79
  "ava": "^5.2.0",
80
80
  "codecov": "^3.8.3",
81
- "core-js": "^3.29.1",
82
- "eslint": "^8.36.0",
81
+ "core-js": "^3.30.1",
82
+ "eslint": "^8.39.0",
83
83
  "eslint-config-google": "^0.14.0",
84
84
  "jsdoc": "^4.0.2",
85
85
  "jsdoc-to-markdown": "^8.0.0",
86
86
  "nyc": "^15.1.0",
87
- "rollup": "^3.19.1",
87
+ "rollup": "^3.21.0",
88
88
  "ttag-cli": "^1.10.5"
89
89
  }
90
90
  }
package/po/he.po CHANGED
@@ -1259,3 +1259,269 @@ msgstr "צוֹם גְּדַלְיָה מִנחָה"
1259
1259
 
1260
1260
  msgid "Tzom Tammuz (Mincha)"
1261
1261
  msgstr "צוֹם תָּמוּז מִנחָה"
1262
+
1263
+ ####### Mishneh Torah #######
1264
+
1265
+ msgid "Transmission of the Oral Law"
1266
+ msgstr "מסירת תורה שבעל פה"
1267
+
1268
+ msgid "Positive Mitzvot"
1269
+ msgstr "מצוות עשה"
1270
+
1271
+ msgid "Negative Mitzvot"
1272
+ msgstr "מצוות לא תעשה"
1273
+
1274
+ msgid "Overview of Mishneh Torah Contents"
1275
+ msgstr "תוכן החיבור"
1276
+
1277
+ msgid "Foundations of the Torah"
1278
+ msgstr "הלכות יסודי התורה"
1279
+
1280
+ msgid "Human Dispositions"
1281
+ msgstr "הלכות דעות"
1282
+
1283
+ msgid "Torah Study"
1284
+ msgstr "הלכות תלמוד תורה"
1285
+
1286
+ msgid "Foreign Worship and Customs of the Nations"
1287
+ msgstr "הלכות עבודה זרה וחוקות הגויים"
1288
+
1289
+ msgid "Repentance"
1290
+ msgstr "הלכות תשובה"
1291
+
1292
+ msgid "Reading the Shema"
1293
+ msgstr "הלכות קריאת שמע"
1294
+
1295
+ msgid "Prayer and the Priestly Blessing"
1296
+ msgstr "הלכות תפילה וברכת כהנים"
1297
+
1298
+ msgid "Tefillin, Mezuzah and the Torah Scroll"
1299
+ msgstr "הלכות תפילין ומזוזה וספר תורה"
1300
+
1301
+ msgid "Fringes"
1302
+ msgstr "הלכות ציצית"
1303
+
1304
+ msgid "Blessings"
1305
+ msgstr "הלכות ברכות"
1306
+
1307
+ msgid "Circumcision"
1308
+ msgstr "הלכות מילה"
1309
+
1310
+ msgid "The Order of Prayer"
1311
+ msgstr "סדר התפילה"
1312
+
1313
+ msgid "Sabbath"
1314
+ msgstr "הלכות שבת"
1315
+
1316
+ # msgid "Eruvin"
1317
+ # msgstr "הלכות עירובין"
1318
+
1319
+ msgid "Rest on the Tenth of Tishrei"
1320
+ msgstr "הלכות שביתת עשור"
1321
+
1322
+ msgid "Rest on a Holiday"
1323
+ msgstr "הלכות שביתת יום טוב"
1324
+
1325
+ msgid "Leavened and Unleavened Bread"
1326
+ msgstr "הלכות חמץ ומצה"
1327
+
1328
+ msgid "Shofar, Sukkah and Lulav"
1329
+ msgstr "הלכות שופר וסוכה ולולב"
1330
+
1331
+ msgid "Sheqel Dues"
1332
+ msgstr "הלכות שקלים"
1333
+
1334
+ msgid "Sanctification of the New Month"
1335
+ msgstr "הלכות קידוש החודש"
1336
+
1337
+ msgid "Fasts"
1338
+ msgstr "הלכות תעניות"
1339
+
1340
+ msgid "Scroll of Esther and Hanukkah"
1341
+ msgstr "הלכות מגילה וחנוכה"
1342
+
1343
+ msgid "Marriage"
1344
+ msgstr "הלכות אישות"
1345
+
1346
+ msgid "Divorce"
1347
+ msgstr "הלכות גירושין"
1348
+
1349
+ msgid "Levirate Marriage and Release"
1350
+ msgstr "הלכות יבום וחליצה"
1351
+
1352
+ msgid "Virgin Maiden"
1353
+ msgstr "הלכות נערה בתולה"
1354
+
1355
+ msgid "Woman Suspected of Infidelity"
1356
+ msgstr "הלכות סוטה"
1357
+
1358
+ msgid "Forbidden Intercourse"
1359
+ msgstr "הלכות איסורי ביאה"
1360
+
1361
+ msgid "Forbidden Foods"
1362
+ msgstr "הלכות מאכלות אסורות"
1363
+
1364
+ msgid "Ritual Slaughter"
1365
+ msgstr "הלכות שחיטה"
1366
+
1367
+ msgid "Oaths"
1368
+ msgstr "הלכות שבועות"
1369
+
1370
+ msgid "Vows"
1371
+ msgstr "הלכות נדרים"
1372
+
1373
+ msgid "Nazariteship"
1374
+ msgstr "הלכות נזירות"
1375
+
1376
+ msgid "Appraisals and Devoted Property"
1377
+ msgstr "הלכות ערכים וחרמין"
1378
+
1379
+ msgid "Diverse Species"
1380
+ msgstr "הלכות כלאים"
1381
+
1382
+ msgid "Gifts to the Poor"
1383
+ msgstr "הלכות מתנות עניים"
1384
+
1385
+ msgid "Heave Offerings"
1386
+ msgstr "הלכות תרומות"
1387
+
1388
+ msgid "Tithes"
1389
+ msgstr "הלכות מעשרות"
1390
+
1391
+ msgid "Second Tithes and Fourth Year's Fruit"
1392
+ msgstr "הלכות מעשר שני ונטע רבעי"
1393
+
1394
+ msgid "First Fruits and other Gifts to Priests Outside the Sanctuary"
1395
+ msgstr "הלכות ביכורים ושאר מתנות כהונה שבגבולין"
1396
+
1397
+ msgid "Sabbatical Year and the Jubilee"
1398
+ msgstr "הלכות שמיטה ויובל"
1399
+
1400
+ msgid "The Chosen Temple"
1401
+ msgstr "הלכות בית הבחירה"
1402
+
1403
+ msgid "Vessels of the Sanctuary and Those who Serve Therein"
1404
+ msgstr "הלכות כלי המקדש והעובדין בו"
1405
+
1406
+ msgid "Admission into the Sanctuary"
1407
+ msgstr "הלכות ביאת מקדש"
1408
+
1409
+ msgid "Things Forbidden on the Altar"
1410
+ msgstr "הלכות איסורי המזבח"
1411
+
1412
+ msgid "Sacrificial Procedure"
1413
+ msgstr "הלכות מעשה הקרבנות"
1414
+
1415
+ msgid "Daily Offerings and Additional Offerings"
1416
+ msgstr "הלכות תמידים ומוספין"
1417
+
1418
+ msgid "Sacrifices Rendered Unfit"
1419
+ msgstr "הלכות פסולי המוקדשין"
1420
+
1421
+ msgid "Service on the Day of Atonement"
1422
+ msgstr "הלכות עבודת יום הכפורים"
1423
+
1424
+ msgid "Trespass"
1425
+ msgstr "הלכות מעילה"
1426
+
1427
+ msgid "Paschal Offering"
1428
+ msgstr "הלכות קרבן פסח"
1429
+
1430
+ msgid "Festival Offering"
1431
+ msgstr "הלכות חגיגה"
1432
+
1433
+ msgid "Firstlings"
1434
+ msgstr "הלכות בכורות"
1435
+
1436
+ msgid "Offerings for Unintentional Transgressions"
1437
+ msgstr "הלכות שגגות"
1438
+
1439
+ msgid "Offerings for Those with Incomplete Atonement"
1440
+ msgstr "הלכות מחוסרי כפרה"
1441
+
1442
+ msgid "Substitution"
1443
+ msgstr "הלכות תמורה"
1444
+
1445
+ msgid "Defilement by a Corpse"
1446
+ msgstr "הלכות טומאת מת"
1447
+
1448
+ msgid "Red Heifer"
1449
+ msgstr "הלכות פרה אדומה"
1450
+
1451
+ msgid "Defilement by Leprosy"
1452
+ msgstr "הלכות טומאת צרעת"
1453
+
1454
+ msgid "Those Who Defile Bed or Seat"
1455
+ msgstr "הלכות מטמאי משכב ומושב"
1456
+
1457
+ msgid "Other Sources of Defilement"
1458
+ msgstr "הלכות שאר אבות הטומאות"
1459
+
1460
+ msgid "Defilement of Foods"
1461
+ msgstr "הלכות טומאת אוכלים"
1462
+
1463
+ msgid "Vessels"
1464
+ msgstr "הלכות כלים"
1465
+
1466
+ msgid "Immersion Pools"
1467
+ msgstr "הלכות מקואות"
1468
+
1469
+ msgid "Damages to Property"
1470
+ msgstr "הלכות נזקי ממון"
1471
+
1472
+ msgid "Theft"
1473
+ msgstr "הלכות גניבה"
1474
+
1475
+ msgid "Robbery and Lost Property"
1476
+ msgstr "הלכות גזילה ואבידה"
1477
+
1478
+ msgid "One Who Injures a Person or Property"
1479
+ msgstr "הלכות חובל ומזיק"
1480
+
1481
+ msgid "Murderer and the Preservation of Life"
1482
+ msgstr "הלכות רוצח ושמירת נפש"
1483
+
1484
+ msgid "Sales"
1485
+ msgstr "הלכות מכירה"
1486
+
1487
+ msgid "Ownerless Property and Gifts"
1488
+ msgstr "הלכות זכייה ומתנה"
1489
+
1490
+ msgid "Neighbors"
1491
+ msgstr "הלכות שכנים"
1492
+
1493
+ msgid "Agents and Partners"
1494
+ msgstr "הלכות שלוחין ושותפין"
1495
+
1496
+ msgid "Slaves"
1497
+ msgstr "הלכות עבדים"
1498
+
1499
+ msgid "Hiring"
1500
+ msgstr "הלכות שכירות"
1501
+
1502
+ msgid "Borrowing and Deposit"
1503
+ msgstr "הלכות שאלה ופיקדון"
1504
+
1505
+ msgid "Creditor and Debtor"
1506
+ msgstr "הלכות מלווה ולווה"
1507
+
1508
+ msgid "Plaintiff and Defendant"
1509
+ msgstr "הלכות טוען ונטען"
1510
+
1511
+ msgid "Inheritances"
1512
+ msgstr "הלכות נחלות"
1513
+
1514
+ msgid "The Sanhedrin and the Penalties within their Jurisdiction"
1515
+ msgstr "הלכות סנהדרין והעונשין המסורין להם"
1516
+
1517
+ msgid "Testimony"
1518
+ msgstr "הלכות עדות"
1519
+
1520
+ msgid "Rebels"
1521
+ msgstr "הלכות ממרים"
1522
+
1523
+ msgid "Mourning"
1524
+ msgstr "הלכות אבל"
1525
+
1526
+ msgid "Kings and Wars"
1527
+ msgstr "הלכות מלכים ומלחמות"