![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Determines the date of Passover for a Gregorian year. Also includes boolean functions to check whether a date is a Jewish holiday, Fast Day or Rosh Chodesh. Supported languages: Javascript Ruby
Add this line to your application's Gemfile: gem 'hebcal' And then execute: $ bundle Or install it yourself as: $ gem install hebcal
$ rake test
At the top of the file where the class is defined, declare require
hebcal``
In the class, declare include HebCal::Passover
WhenIsPesach(yyyy)
returns a Ruby Time object representing midnight on the first day of passover, where yyyy
is the Gregorian year
Note that the date returned is the first day of Pesach, not the day on which Pesach begins at sunset.
At the top of the file where the class is defined, declare require
hebcal``
In the desired class, declare include HebCal::Holidays
IsPesach(d)
returns true iff d is a Ruby Time object representing a date during Pesach. Note that the day on which Pesach begins at sunset returns false.
The following functions work in a similar way to IsPesach()
:
IsShavuot()
, IsRoshHashanah()
, IsYomKippur()
, IsSukkot()
IsRegel()
: IsPesach() || IsShavuot || IsSukkot()
IsMoed()
: Hol HaMoed Pesach or Hol HaMoed Sukkot
IsYomTov()
: IsPesach() || IsShavuot() || IsRoshHashanah() || IsSukkot()) && !IsMoed()
Note that IsYomTov(yk) == false, where yk is the date of Yom Kippur.
IsPurim()
, IsHanuka()
Is10Tevet()
, IsTaanitEster()
, Is17Tamuz()
, Is9Av()
, IsFastOfGedalia()
IsTaanit()
: Is10Tevet() || IsTaanitEster() || Is17Tamuz() || Is9Av() || IsFastOfGedalia()
IsRoshChodesh()
Include the javascript source file in your HTML page
If using Ruby On Rails, you can declare //= require hebcal
at the top of a javascript or coffeescript file
To include the script explicitly in an html file,
<script src="app/assets/javascripts/hebcal/passover.js" type="text/javascript"></script>
All date formats are YYYY-mm-dd, where month is index from 1 (i.e. 1 == January, not the usual javascript index of 0 == January!) and YYYY is the Gregorian year.
$.whenIsPesach(yyyy) returns a date in the above format, where yyyy is the Gregorian year.
Note that the date returned is the first day of Pesach, not the day on which Pesach begins at sunset.
$.isPesach(d) returns true iff d is a date during Pesach, in the above format. Note that the day on which Pesach begins at sunset returns false.
The following functions work in a similar way to $.isPesach():
$.isShavuot(), $.isRoshHashanah(), $.isYomKippur(), $.isSukkot();
$.isRegel(): $.isPesach() || $.isShavuot() || $.isSukkot();
$.isMoed(): Hol HaMoed Pesach or Hol HaMoed Sukkot;
$.isYomTov(): ($.isPesach() || $.isSukkot() || $.isShavuot() || $.isRoshHashanah()) && !$.isMoed();
Note that isYomTov(yk) == false, where yk is the date of Yom Kippur.
$.isPurim()
, $.isHanuka()
$.isRoshChodesh()
$.is10Tevet()
, $.isTaanitEster()
, $.is17Tamuz()
, $.is9Av()
, $.isFastOfGedalia()
$.isTaanit()
: $.is10Tevet() || $.isTaanitEster() || $.is17Tamuz() || $.is9Av() || $.isFastOfGedalia()
FAQs
Unknown package
We found that hebcal 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.