@hebcal/learning
v5.1.1
Published
Daily learning schedules: Daf Yomi, Mishna Yomi, etc
Downloads
598
Readme
hebcal-learning
Javascript Daily Learning Schedules
Supports several learning schedules
- Daf Yomi (Babylonian Talmud / Bavli) -
dafYomi
- Mishna Yomi -
mishnaYomi
- Nach Yomi -
nachYomi
- Tanakh Yomi -
tanakhYomi
- Psalms / Tehillim (30 day cycle) -
psalms
- Yerushalmi Yomi (Jerusalem Talmud)
- Vilna edition -
yerushalmi-vilna
- Schottenstein edition -
yerushalmi-schottenstein
- Vilna edition -
- Daily Rambam (Mishneh Torah)
- 1 chapter a day cycle -
rambam1
- 1 chapter a day cycle -
- Chofetz Chaim -
chofetzChaim
- Sefer Shemirat HaLashon -
shemiratHaLashon
- Daf-a-Week
- Daily -
dafWeekly
- Sundays only -
dafWeeklySunday
- Daily -
- Pirkei Avot studied on Shabbat between Pesach and Rosh Hashana -
pirkeiAvotSummer
Installation
$ npm install @hebcal/learning
Synopsis
import {HDate, DailyLearning} from '@hebcal/core';
import '@hebcal/learning';
const dt = new Date();
const hd = new HDate(dt);
const ev = DailyLearning.lookup('dafYomi', hd);
console.log(dt.toLocaleDateString(), hd.toString(), ev.render('en'));
Classes
Constants
Functions
Typedefs
DafPage
Represents a tractate and page number
Kind: global class
- DafPage
- new DafPage(name, blatt)
- .getBlatt() ⇒ number
- .getName() ⇒ string
- .render([locale]) ⇒ string
new DafPage(name, blatt)
Initializes a daf yomi instance
| Param | Type | | --- | --- | | name | string | | blatt | number |
dafPage.getBlatt() ⇒ number
Kind: instance method of DafPage
dafPage.getName() ⇒ string
Kind: instance method of DafPage
dafPage.render([locale]) ⇒ string
Formats (with translation) the dafyomi result as a string like "Pesachim 34"
Kind: instance method of DafPage
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
DafPageEvent
Event wrapper around a DafPage instance
Kind: global class
- DafPageEvent
- new DafPageEvent(date, daf, mask)
- .render([locale]) ⇒ string
- .renderBrief([locale]) ⇒ string
- .url() ⇒ string
new DafPageEvent(date, daf, mask)
| Param | Type | | --- | --- | | date | HDate | | daf | DafPage | | mask | number |
dafPageEvent.render([locale]) ⇒ string
Returns Daf Yomi name including the 'Daf Yomi: ' prefix (e.g. "Daf Yomi: Pesachim 107").
Kind: instance method of DafPageEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
dafPageEvent.renderBrief([locale]) ⇒ string
Returns Daf Yomi name without the 'Daf Yomi: ' prefix (e.g. "Pesachim 107").
Kind: instance method of DafPageEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
dafPageEvent.url() ⇒ string
Returns a link to sefaria.org or dafyomi.org
Kind: instance method of DafPageEvent
DafYomi
Returns the Daf Yomi for given date
Kind: global class
new DafYomi(date)
Initializes a daf yomi instance
| Param | Type | Description | | --- | --- | --- | | date | Date | HDate | number | Gregorian or Hebrew date |
DafYomiEvent
Event wrapper around a DafYomi instance
Kind: global class
- DafYomiEvent
- new DafYomiEvent(date)
- .render([locale]) ⇒ string
- .getCategories() ⇒ Array.<string>
new DafYomiEvent(date)
| Param | Type | | --- | --- | | date | HDate |
dafYomiEvent.render([locale]) ⇒ string
Returns Daf Yomi name including the 'Daf Yomi: ' prefix (e.g. "Daf Yomi: Pesachim 107").
Kind: instance method of DafYomiEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
dafYomiEvent.getCategories() ⇒ Array.<string>
Kind: instance method of DafYomiEvent
MishnaYomiEvent
Event wrapper around a Mishna Yomi instance
Kind: global class
- MishnaYomiEvent
- new MishnaYomiEvent(date, mishnaYomi)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new MishnaYomiEvent(date, mishnaYomi)
| Param | Type | | --- | --- | | date | HDate | | mishnaYomi | Array.<MishnaYomi> |
mishnaYomiEvent.render([locale]) ⇒ string
Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
Kind: instance method of MishnaYomiEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
mishnaYomiEvent.url() ⇒ string
Returns a link to sefaria.org
Kind: instance method of MishnaYomiEvent
mishnaYomiEvent.getCategories() ⇒ Array.<string>
Kind: instance method of MishnaYomiEvent
MishnaYomiIndex
A program of daily learning in which participants study two Mishnahs each day in order to finish the entire Mishnah in ~6 years.
Kind: global class
new MishnaYomiIndex()
Initializes a Mishna Yomi instance
mishnaYomiIndex.days : Array.<MishnaYomi>
Kind: instance property of MishnaYomiIndex
mishnaYomiIndex.lookup(date) ⇒ Array.<MishnaYomi>
Looks up a Mishna Yomi
Kind: instance method of MishnaYomiIndex
| Param | Type | Description | | --- | --- | --- | | date | Date | HDate | number | Gregorian date |
NachYomiEvent
Event wrapper around a Nach Yomi instance
Kind: global class
- NachYomiEvent
- new NachYomiEvent(date, nachYomi)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new NachYomiEvent(date, nachYomi)
| Param | Type | | --- | --- | | date | HDate | | nachYomi | NachYomi |
nachYomiEvent.render([locale]) ⇒ string
Returns name of tractate and page (e.g. "Beitzah 21").
Kind: instance method of NachYomiEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
nachYomiEvent.url() ⇒ string
Returns a link to sefaria.org
Kind: instance method of NachYomiEvent
nachYomiEvent.getCategories() ⇒ Array.<string>
Kind: instance method of NachYomiEvent
NachYomiIndex
A daily regimen of learning the books of Nevi'im (Prophets) and Ketuvim (Writings).
Kind: global class
new NachYomiIndex()
Initializes a Nach Yomi instance
nachYomiIndex.lookup(date) ⇒ NachYomi
Looks up a Mishna Yomi
Kind: instance method of NachYomiIndex
| Param | Type | Description | | --- | --- | --- | | date | Date | HDate | number | Gregorian date |
YerushalmiYomiEvent
Event wrapper around a Yerushalmi Yomi result
Kind: global class
- YerushalmiYomiEvent
- new YerushalmiYomiEvent(date, daf)
- .render([locale]) ⇒ string
- .renderBrief([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new YerushalmiYomiEvent(date, daf)
| Param | Type | | --- | --- | | date | HDate | | daf | any |
yerushalmiYomiEvent.render([locale]) ⇒ string
Returns name of tractate and page (e.g. "Yerushalmi Beitzah 21").
Kind: instance method of YerushalmiYomiEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
yerushalmiYomiEvent.renderBrief([locale]) ⇒ string
Returns name of tractate and page (e.g. "Beitzah 21").
Kind: instance method of YerushalmiYomiEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
yerushalmiYomiEvent.url() ⇒ string
Returns a link to sefaria.org
Kind: instance method of YerushalmiYomiEvent
yerushalmiYomiEvent.getCategories() ⇒ Array.<string>
Kind: instance method of YerushalmiYomiEvent
ChofetzChaimEvent
Event wrapper around a Chofetz Chaim instance
Kind: global class
- ChofetzChaimEvent
- new ChofetzChaimEvent(date, reading)
- .renderBrief([locale]) ⇒ string
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new ChofetzChaimEvent(date, reading)
| Param | Type | | --- | --- | | date | HDate | | reading | any |
chofetzChaimEvent.renderBrief([locale]) ⇒ string
Returns name of reading
Kind: instance method of ChofetzChaimEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
chofetzChaimEvent.render([locale]) ⇒ string
Returns name of reading
Kind: instance method of ChofetzChaimEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
chofetzChaimEvent.url() ⇒ string
Returns a link to sefaria.org e.g. https://www.sefaria.org/Chofetz_Chaim%2C_Part_One%2C_The_Prohibition_Against_Lashon_Hara%2C_Principle_7.7
Kind: instance method of ChofetzChaimEvent
chofetzChaimEvent.getCategories() ⇒ Array.<string>
Kind: instance method of ChofetzChaimEvent
DailyRambamEvent
Event wrapper around a Daily Rambam instance
Kind: global class
- DailyRambamEvent
- new DailyRambamEvent(date, reading)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new DailyRambamEvent(date, reading)
| Param | Type | | --- | --- | | date | HDate | | reading | any |
dailyRambamEvent.render([locale]) ⇒ string
Returns name of reading
Kind: instance method of DailyRambamEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
dailyRambamEvent.url() ⇒ string
Returns a link to sefaria.org
Kind: instance method of DailyRambamEvent
dailyRambamEvent.getCategories() ⇒ Array.<string>
Kind: instance method of DailyRambamEvent
ShemiratHaLashonEvent
Event wrapper around a Sefer Shemirat HaLashon instance
Kind: global class
- ShemiratHaLashonEvent
- new ShemiratHaLashonEvent(date, reading)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new ShemiratHaLashonEvent(date, reading)
| Param | Type | | --- | --- | | date | HDate | | reading | any |
shemiratHaLashonEvent.render([locale]) ⇒ string
Returns name of reading
Kind: instance method of ShemiratHaLashonEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
shemiratHaLashonEvent.url() ⇒ string
Returns a link to sefaria.org e.g. https://www.sefaria.org/Shemirat_HaLashon%2C_Book_I%2C_The_Gate_of_Torah.4.2?lang=b
Kind: instance method of ShemiratHaLashonEvent
shemiratHaLashonEvent.getCategories() ⇒ Array.<string>
Kind: instance method of ShemiratHaLashonEvent
PsalmsEvent
Event wrapper around a daily Psalms / Tehillim
Kind: global class
- PsalmsEvent
- new PsalmsEvent(date, reading)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new PsalmsEvent(date, reading)
| Param | Type | | --- | --- | | date | HDate | | reading | Array.<number> | Array.<string> |
psalmsEvent.render([locale]) ⇒ string
Returns name of reading
Kind: instance method of PsalmsEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
psalmsEvent.url() ⇒ string
Returns a link to sefaria.org e.g. https://www.sefaria.org/Psalms.1-9?lang=b
Kind: instance method of PsalmsEvent
psalmsEvent.getCategories() ⇒ Array.<string>
Kind: instance method of PsalmsEvent
DafWeeklyEvent
Event wrapper around a daily weekly
Kind: global class
- DafWeeklyEvent
- new DafWeeklyEvent(date, daf)
- .getCategories() ⇒ Array.<string>
new DafWeeklyEvent(date, daf)
| Param | Type | | --- | --- | | date | HDate | | daf | DafPage |
dafWeeklyEvent.getCategories() ⇒ Array.<string>
Kind: instance method of DafWeeklyEvent
TanakhYomi
Returns the Daf Yomi for given date
Kind: global class
new TanakhYomi(name, blatt)
Initializes a daf yomi instance
| Param | Type | | --- | --- | | name | string | | blatt | number |
tanakhYomi.render([locale]) ⇒ string
Formats (with translation) the dafyomi result as a string like "Pesachim 34"
Kind: instance method of TanakhYomi
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
TanakhYomiEvent
Event wrapper around a tanakhYomi
Kind: global class
- TanakhYomiEvent
- new TanakhYomiEvent(date, daf)
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new TanakhYomiEvent(date, daf)
| Param | Type | | --- | --- | | date | HDate | | daf | TanakhYomi |
tanakhYomiEvent.url() ⇒ string
Returns a link to sefaria.org or dafyomi.org
Kind: instance method of TanakhYomiEvent
tanakhYomiEvent.getCategories() ⇒ Array.<string>
Kind: instance method of TanakhYomiEvent
PirkeiAvotSummerEvent
Event wrapper for Pirkei Avot being studied on Shabbat between Pesach and Rosh Hashana
Kind: global class
- PirkeiAvotSummerEvent
- new PirkeiAvotSummerEvent(date, reading)
- .render([locale]) ⇒ string
- .url() ⇒ string
- .getCategories() ⇒ Array.<string>
new PirkeiAvotSummerEvent(date, reading)
| Param | Type | | --- | --- | | date | HDate | | reading | Array.<number> |
pirkeiAvotSummerEvent.render([locale]) ⇒ string
Returns name of reading
Kind: instance method of PirkeiAvotSummerEvent
| Param | Type | Description | | --- | --- | --- | | [locale] | string | Optional locale name (defaults to active locale). |
pirkeiAvotSummerEvent.url() ⇒ string
Returns a link to sefaria.org
Kind: instance method of PirkeiAvotSummerEvent
pirkeiAvotSummerEvent.getCategories() ⇒ Array.<string>
Kind: instance method of PirkeiAvotSummerEvent
vilna
Yerushalmi Yomi configuration for Vilna Edition
Kind: global constant
Read only: true
schottenstein
Yerushalmi Yomi configuration for Schottenstein Edition
Kind: global constant
Read only: true
yerushalmiYomi(date, config) ⇒ any
Using the Vilna edition, the Yerushalmi Daf Yomi program takes
~4.25 years or 51 months.
Unlike the Daf Yomi Bavli cycle, this Yerushalmi cycle skips both
Yom Kippur and Tisha B'Av (returning null
).
The page numbers are according to the Vilna
Edition which is used since 1900.
The Schottenstein edition uses different page numbers and takes ~6 years to complete.
Throws an exception if the date is before Daf Yomi Yerushalmi cycle began (2 February 1980 for Vilna, 14 November 2022 for Schottenstein).
Kind: global function
| Param | Type | Description | | --- | --- | --- | | date | HDate | Date | number | Hebrew or Gregorian date | | config | any | either vilna or schottenstein |
chofetzChaim(hdate) ⇒ any
Looks up Chofetz Chaim Calendar for date
Kind: global function
| Param | Type | | --- | --- | | hdate | HDate |
dailyRambam1(date) ⇒ any
Calculates Daily Rambam (Mishneh Torah) for 1 chapter a day cycle.
Kind: global function
| Param | Type | Description | | --- | --- | --- | | date | HDate | Date | number | Hebrew or Gregorian date |
shemiratHaLashon(hdate) ⇒ any
Looks up Sefer Shemirat HaLashon Calendar for date
Kind: global function
| Param | Type | | --- | --- | | hdate | HDate |
dailyPsalms(date) ⇒ any
Calculates Daily Psalms (Tehillim) for 30-day cycle.
Kind: global function
| Param | Type | Description | | --- | --- | --- | | date | HDate | Date | number | Hebrew or Gregorian date |
dafWeekly(date) ⇒ DafPage
Daf-a-Week
Kind: global function
| Param | Type | Description | | --- | --- | --- | | date | HDate | Date | number | Hebrew or Gregorian date |
tanakhYomi(date) ⇒ TanakhYomi
Calculates Tanakh Yomi.
Kind: global function
| Param | Type | Description | | --- | --- | --- | | date | HDate | Date | number | Hebrew or Gregorian date |
pirkeiAvot(dt, il) ⇒ Array.<number>
Pirkei Avot being studied on Shabbat between Pesach and Rosh Hashana
"From at least the time of Saadia Gaon (10th century), it has been customary to study one chapter a week on each Shabbat between Passover and Shavuot; today, the tractate is generally studied on each Shabbat of the summer, from Passover to Rosh Hashanah, the entire cycle repeating a few times with doubling of chapters at the end if there are not a perfect multiple of six weeks" https://en.wikipedia.org/wiki/Pirkei_Avot#Study_of_the_work
returns array (since it can return 2 chapters) or undefined if there is no Pirkei Avot on that day optimized for diaspora and il feel free to modify whatever you want, i am sure this task can be done in different ways and orders
Kind: global function
| Param | Type | | --- | --- | | dt | Date | HDate | | il | boolean |
MishnaYomi : Object
Describes a mishna to be read
Kind: global typedef
Properties
| Name | Type | Description | | --- | --- | --- | | k | string | tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") | | v | string | verse (e.g. "2:1") |
NachYomi : Object
Describes a chapter to be read
Kind: global typedef
Properties
| Name | Type | Description | | --- | --- | --- | | k | string | book name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") | | v | number | chapter (e.g. "2:1") |