
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
hebrew_date
is a library designed to provide information about the Jewish
calendar. This includes dates, holidays, and parsha of the week.
Full documentation can be found here.
To initialize a Hebrew date, you can use either the English date:
HebrewDate.new(2009, 12, 25)
or the Hebrew one:
HebrewDate.new_from_hebrew(5775, 4, 29)
HebrewDates respond to all the methods dates do:
HebrewDate.new.saturday?
HebrewDate.new.beginning_of_week # Rails
HebrewDate.new + 3 # go 3 days forward
HebrewDate also responds to strftime
, but provides a number of additional
flags for printing Hebrew dates. These are identical to the normal flags
except that they start with * instead of %:
*Y
- Hebrew year*m
- Hebrew month, zero-padded*_m
- Hebrew month, blank-padded*-m
- Hebrew month, no-padded*B
- Hebrew month, full name*^B
- Hebrew month, full name uppercase*b
- Hebrew month, 3 letters*^b
- Hebrew month, 3 letters uppercase*h
- same as %*b*d
- Hebrew day of month, zero-padded*-d
- Hebrew day of month, no-padded*e
- Hebrew day of month, blank-paddedThere is an additional flag added which is of simple utility:
%.b
- Gregorian day of month, followed by a period (.), except for May,
which doesn't need one and is incorrect.You can get the parsha of the current day by calling the parsha
method.
This will only return a value if it is on Shabbat. By default the parsha
will have "special" values appended to it (e.g. the special Parshiyot,
Shekalim, Zachor, Parah and Hachodesh), which can optionally be suppressed.
By default HebrewDate will use the "chutz la'aretz" parsha scheme (i.e. assuming two-day Yom Tov). You can use the Israeli scheme by calling
HebrewDate.israeli = true
before creating your first instance of HebrewDate.
If the current date is a Jewish holiday (including Erev Yom Tov and the
"modern" holidays of Yom Ha'atzmaut, Yom Hazikaron and Yom Yerushalayim) you
can retrieve those as strings via the holiday
method.
Month names, holidays and parshiyot all will be in Sephardic / Mizrachi accents by default. You can change this to Ashkenazi pronunciation by calling
HebrewDate.ashkenazi = true
You can also retrieve a date from the holiday name:
HebrewDate.from_holiday(:PURIM, 5774)
FAQs
Unknown package
We found that hebrew_date demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.