5.0.7 • Published 2 months ago

@hebcal/learning v5.0.7

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
2 months ago

hebcal-learning

Javascript Daily Learning Schedules

Build Status

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
  • Daily Rambam (Mishneh Torah)
    • 1 chapter a day cycle - rambam1
  • Chofetz Chaim - chofetzChaim
  • Sefer Shemirat HaLashon - shemiratHaLashon
  • Daf-a-Week
    • Daily - dafWeekly
    • Sundays only - dafWeeklySunday

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

new DafPage(name, blatt)

Initializes a daf yomi instance

ParamType
namestring
blattnumber

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

ParamTypeDescription
localestringOptional locale name (defaults to active locale).

DafPageEvent

Event wrapper around a DafPage instance

Kind: global class

new DafPageEvent(date, daf, mask)

ParamType
dateHDate
dafDafPage
masknumber

dafPageEvent.render(locale) ⇒ string

Returns Daf Yomi name including the 'Daf Yomi: ' prefix (e.g. "Daf Yomi: Pesachim 107").

Kind: instance method of DafPageEvent

ParamTypeDescription
localestringOptional 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

ParamTypeDescription
localestringOptional 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

ParamTypeDescription
dateDate | HDate | numberGregorian or Hebrew date

DafYomiEvent

Event wrapper around a DafYomi instance

Kind: global class

new DafYomiEvent(date)

ParamType
dateHDate

dafYomiEvent.render(locale) ⇒ string

Returns Daf Yomi name including the 'Daf Yomi: ' prefix (e.g. "Daf Yomi: Pesachim 107").

Kind: instance method of DafYomiEvent

ParamTypeDescription
localestringOptional 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

new MishnaYomiEvent(date, mishnaYomi)

ParamType
dateHDate
mishnaYomiArray.<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

ParamTypeDescription
localestringOptional 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

ParamTypeDescription
dateDate | HDate | numberGregorian date

NachYomiEvent

Event wrapper around a Nach Yomi instance

Kind: global class

new NachYomiEvent(date, nachYomi)

ParamType
dateHDate
nachYomiNachYomi

nachYomiEvent.render(locale) ⇒ string

Returns name of tractate and page (e.g. "Beitzah 21").

Kind: instance method of NachYomiEvent

ParamTypeDescription
localestringOptional 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

ParamTypeDescription
dateDate | HDate | numberGregorian date

YerushalmiYomiEvent

Event wrapper around a Yerushalmi Yomi result

Kind: global class

new YerushalmiYomiEvent(date, daf)

ParamType
dateHDate
dafany

yerushalmiYomiEvent.render(locale) ⇒ string

Returns name of tractate and page (e.g. "Yerushalmi Beitzah 21").

Kind: instance method of YerushalmiYomiEvent

ParamTypeDescription
localestringOptional 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

ParamTypeDescription
localestringOptional 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

new ChofetzChaimEvent(date, reading)

ParamType
dateHDate
readingany

chofetzChaimEvent.render(locale) ⇒ string

Returns name of reading

Kind: instance method of ChofetzChaimEvent

ParamTypeDescription
localestringOptional 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

new DailyRambamEvent(date, reading)

ParamType
dateHDate
readingany

dailyRambamEvent.render(locale) ⇒ string

Returns name of reading

Kind: instance method of DailyRambamEvent

ParamTypeDescription
localestringOptional 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

new ShemiratHaLashonEvent(date, reading)

ParamType
dateHDate
readingany

shemiratHaLashonEvent.render(locale) ⇒ string

Returns name of reading

Kind: instance method of ShemiratHaLashonEvent

ParamTypeDescription
localestringOptional 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

new PsalmsEvent(date, reading)

ParamType
dateHDate
readingArray.<number> | Array.<string>

psalmsEvent.render(locale) ⇒ string

Returns name of reading

Kind: instance method of PsalmsEvent

ParamTypeDescription
localestringOptional 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

new DafWeeklyEvent(date, daf)

ParamType
dateHDate
dafDafPage

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

ParamType
namestring
blattnumber

tanakhYomi.render(locale) ⇒ string

Formats (with translation) the dafyomi result as a string like "Pesachim 34"

Kind: instance method of TanakhYomi

ParamTypeDescription
localestringOptional locale name (defaults to active locale).

TanakhYomiEvent

Event wrapper around a tanakhYomi

Kind: global class

new TanakhYomiEvent(date, daf)

ParamType
dateHDate
dafTanakhYomi

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

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

ParamTypeDescription
dateHDate | Date | numberHebrew or Gregorian date
configanyeither vilna or schottenstein

chofetzChaim(hdate) ⇒ any

Looks up Chofetz Chaim Calendar for date

Kind: global function

ParamType
hdateHDate

dailyRambam1(date) ⇒ any

Calculates Daily Rambam (Mishneh Torah) for 1 chapter a day cycle.

Kind: global function

ParamTypeDescription
dateHDate | Date | numberHebrew or Gregorian date

shemiratHaLashon(hdate) ⇒ any

Looks up Sefer Shemirat HaLashon Calendar for date

Kind: global function

ParamType
hdateHDate

dailyPsalms(date) ⇒ any

Calculates Daily Psalms (Tehillim) for 30-day cycle.

Kind: global function

ParamTypeDescription
dateHDate | Date | numberHebrew or Gregorian date

dafWeekly(date) ⇒ DafPage

Daf-a-Week

Kind: global function

ParamTypeDescription
dateHDate | Date | numberHebrew or Gregorian date

tanakhYomi(date) ⇒ TanakhYomi

Calculates Tanakh Yomi.

Kind: global function

ParamTypeDescription
dateHDate | Date | numberHebrew or Gregorian date

MishnaYomi : Object

Describes a mishna to be read

Kind: global typedef
Properties

NameTypeDescription
kstringtractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan")
vstringverse (e.g. "2:1")

NachYomi : Object

Describes a chapter to be read

Kind: global typedef
Properties

NameTypeDescription
kstringbook name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan")
vnumberchapter (e.g. "2:1")
5.0.7

2 months ago

5.0.6

3 months ago

5.0.5

3 months ago

5.0.4

3 months ago

5.0.3

3 months ago

5.0.2

5 months ago

5.0.1

5 months ago

5.0.0

5 months ago

1.5.2

7 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.2.0

1 year ago

1.3.4

11 months ago

1.3.3

11 months ago

1.3.2

12 months ago

1.4.0

11 months ago

1.3.1

12 months ago

1.3.0

12 months ago

1.2.1

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago