npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hebcal/triennial

v5.0.5

Published

Javascript Triennial Torah Readings

Downloads

206

Readme

@hebcal/triennial

Javascript Triennial Torah Readings

Build Status

“Many congregations pattern their weekly Torah reading cycle after a system similar to the one used in ancient Israel during the rabbinic period. In this system, the traditional parashiot are each divided into three shorter segments, and the whole Torah is completed once every three years. The system has both advantages and disadvantages, but its ability to shorten the length of Torah reading without sacrificing the complete reading of the Torah on a regular basis has made it the choice of some synagogues in the Conservative Movement.”

A Complete Triennial System for Reading the Torah, Committee on Jewish Law and Standards of the Rabbinical Assembly

Update December 2021: In November 2020, the CJLS modified the triennial cycle for some combined parshiyot to change the reading for year 3 to be the third section of the parashah.

Modification of the Triennial Cycle Readings for Combined Parashot in Certain Years, Rabbi Miles B. Cohen

Update August 2022: Incorporated An Emendation to Richard Eisenberg’s Complete Triennial System for Reading Torah, to Address a Rare Situation, Rabbi Joshua Heller, 2012

Installation

$ npm install @hebcal/triennial

Synopsis

import {HebrewCalendar, HDate, Event} from '@hebcal/core';
import {formatAliyahWithBook} from '@hebcal/leyning';
import {getTriennialForParshaHaShavua} from '@hebcal/triennial';

const events = HebrewCalendar.calendar({sedrot: true, noHolidays: true});
const ev = events.find((ev) => ev.getDesc() == 'Parashat Pinchas');
const triReading = getTriennialForParshaHaShavua(ev);
for (const [num, aliyah] of Object.entries(triReading)) {
  const number = num == 'M' ? 'maftir' : `aliyah ${num}`;
  const str = formatAliyahWithBook(aliyah);
  console.log(`Triennial ${number}: ${str}`);
}

Classes

Functions

Typedefs

Triennial

Triennial Torah readings

Kind: global class

new Triennial([hebrewYear], [il])

Calculates Triennial schedule for entire Hebrew year

| Param | Type | Default | Description | | --- | --- | --- | --- | | [hebrewYear] | number | | Hebrew Year (default current year) | | [il] | boolean | false | Israel (default false) |

triennial.getReading(parsha, yearNum) ⇒ TriennialAliyot

Kind: instance method of Triennial
Returns: TriennialAliyot - result, including a map of aliyot 1-7 plus "M"

| Param | Type | Description | | --- | --- | --- | | parsha | string | parsha name ("Bereshit" or "Achrei Mot-Kedoshim") | | yearNum | number | 0 through 2 for which year of Triennial cycle |

triennial.getStartYear() ⇒ number

Kind: instance method of Triennial

triennial.debug() ⇒ string

Kind: instance method of Triennial

Triennial.getYearNumber(year) ⇒ number

Returns triennial year 1, 2 or 3 based on this Hebrew year

Kind: static method of Triennial

| Param | Type | Description | | --- | --- | --- | | year | number | Hebrew year |

Triennial.getCycleStartYear(year) ⇒ number

Returns Hebrew year that this 3-year triennial cycle began

Kind: static method of Triennial

| Param | Type | Description | | --- | --- | --- | | year | number | Hebrew year |

getTriennial(year, [il]) ⇒ Triennial

Calculates the 3-year readings for a given year

Kind: global function

| Param | Type | Default | Description | | --- | --- | --- | --- | | year | number | | Hebrew year | | [il] | boolean | false | Israel |

getTriennialHaftaraForHoliday(key, yearNum) ⇒ Object

Looks up the alternative triennial Haftara for a holiday

Kind: global function

| Param | Type | | --- | --- | | key | string | | yearNum | number |

getTriennialForParshaHaShavua(ev, [il]) ⇒ TriennialAliyot

Looks up the triennial leyning for this Parashat HaShavua

Kind: global function
Returns: TriennialAliyot - a map of aliyot 1-7 plus "M"

| Param | Type | Default | Description | | --- | --- | --- | --- | | ev | Event | | | | [il] | boolean | false | Israel |

writeTriennialCsv(stream, hyear, [il])

Kind: global function

| Param | Type | Default | | --- | --- | --- | | stream | fs.WriteStream | | | hyear | number | | | [il] | boolean | false |

TriennialAliyot : Object

Represents triennial aliyot for a given date

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | aliyot | Object.<string, Aliyah> | a map of aliyot 1-7 plus "M" | | yearNum | number | year number, 0-2 | | date | Date | Shabbat date for when this parsha is read in this 3-year cycle | | [readSeparately] | boolean | true if a double parsha is read separately in year yearNum | | [date1] | Date | Shabbat date of the first part of a read-separately aliyah pair | | [date2] | Date | Shabbat date of the second part of a read-separately aliyah pair | | [fullParsha] | boolean | true if we read the entire parsha |