Closed isaacfink closed 4 months ago
For a given Saturday, you can get all of the events on the date and then render them as Hebrew using something like the following:
import {HebrewCalendar, HDate} from '@hebcal/core';
const saturday = new Date(2024, 3, 6); // 2024-04-06
const hd = new HDate(saturday);
const events = HebrewCalendar.calendar({
start: hd,
end: hd,
sedrot: true,
});
const strs = events.map((ev) => ev.render('he'));
const str = strs.join(' ');
console.log(str); // 'שַׁבָּת הַחֹדֶשׁ פָּרָשַׁת שְּׁמִינִי'
For example I want a way to get the following string (in hebrew)
I had this exact functionality at some point with a single function without constructing the string myself, but I don't remember how I did it