@hebcal/core 3.48.2 → 3.48.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/greg0.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  /*
3
3
  * More minimal greg routines
4
4
  */
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1893,7 +1893,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
1893
1893
  return new HDate(day, month, hyear);
1894
1894
  }
1895
1895
 
1896
- var version="3.48.2";
1896
+ var version="3.48.4";
1897
1897
 
1898
1898
  var headers={"plural-forms":"nplurals=2; plural=(n > 1);"};var contexts={"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}};var poHeMin = {headers:headers,contexts:contexts};
1899
1899
 
@@ -1,2 +1,2 @@
1
- /*! @hebcal/core v3.48.2 */
2
- var hebcal=function(e){"use strict";function t(e){switch(e){case 1:return"א";case 2:return"ב";case 3:return"ג";case 4:return"ד";case 5:return"ה";case 6:return"ו";case 7:return"ז";case 8:return"ח";case 9:return"ט";case 10:return"י";case 20:return"כ";case 30:return"ל";case 40:return"מ";case 50:return"נ";case 60:return"ס";case 70:return"ע";case 80:return"פ";case 90:return"צ";case 100:return"ק";case 200:return"ר";case 300:return"ש";case 400:return"ת";default:return"*INVALID*"}}function r(e){for(var t=[];e>0;){if(15===e||16===e){t.push(9),t.push(e-9);break}var r=100,n=void 0;for(n=400;n>e;n-=r)n===r&&(r/=10);t.push(n),e-=n}return t}function n(e){var n=parseInt(e,10);if(!n)throw new TypeError("invalid parameter to gematriya ".concat(e));var a="",o=Math.floor(n/1e3);if(o>0&&5!==o){for(var u=r(o),i=0;i<u.length;i++)a+=t(u[i]);a+="׳"}var c=r(n%1e3);if(1==c.length)return a+t(c[0])+"׳";for(var s=0;s<c.length;s++)s+1===c.length&&(a+="״"),a+=t(c[s]);return a}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var h=[0,31,28,31,30,31,30,31,31,30,31,30,31],l=[h,h.slice()];function f(e,t){return e-t*Math.floor(e/t)}function y(e,t){return Math.floor(e/t)}function v(e){return!(e%4||!(e%100)&&e%400)}function m(e){return"object"===a(e)&&Date.prototype===e.__proto__}function d(e){if(!m(e))throw new TypeError("Argument not a Date: ".concat(e));return g(e.getFullYear(),e.getMonth()+1,e.getDate())}function g(e,t,r){var n=e-1;return 365*n+y(n,4)-y(n,100)+y(n,400)+y(367*t-362,12)+(t<=2?0:v(e)?-1:-2)+r}function b(e){if("number"!=typeof e)throw new TypeError("Argument not a Number: ".concat(e));var t=function(e){var t=e-1,r=y(t,146097),n=f(t,146097),a=y(n,36524),o=f(n,36524),u=y(o,1461),i=y(f(o,1461),365),c=400*r+100*a+4*u+i;return 4!=a&&4!=i?c+1:c}(e=Math.trunc(e)),r=y(12*(e-g(t,1,1)+(e<g(t,3,1)?0:v(t)?1:2))+373,367),n=e-g(t,r,1)+1,a=new Date(t,r-1,n);return t<100&&t>=0&&a.setFullYear(t),a}l[1][2]=29;var w=function(){function e(){o(this,e)}return i(e,null,[{key:"isLeapYear",value:function(e){return v(e)}},{key:"daysInMonth",value:function(e,t){return function(e,t){return l[+v(t)][e]}(e,t)}},{key:"isDate",value:function(e){return m(e)}},{key:"dayOfYear",value:function(e){if(!m(e))throw new TypeError("Argument not a Date: ".concat(e));var t=e.getMonth(),r=e.getDate()+31*t;return t>1&&(r-=Math.floor((4*(t+1)+23)/10),v(e.getFullYear())&&r++),r}},{key:"greg2abs",value:function(e){return d(e)}},{key:"abs2greg",value:function(e){return b(e)}}]),e}();c(w,"monthNames",["","January","February","March","April","May","June","July","August","September","October","November","December"]);var k={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},p={h:"he",a:"ashkenazi",s:"en","":"en"},A=function(){function e(){o(this,e)}return i(e,null,[{key:"lookupTranslation",value:function(e,t){var r=t&&t.toLowerCase(),n=("string"==typeof t&&this.locales[r]||this.activeLocale)[e];if(n&&n.length&&n[0].length)return n[0]}},{key:"gettext",value:function(e,t){var r=this.lookupTranslation(e,t);return void 0===r?e:r}},{key:"addLocale",value:function(e,t){if("object"!==a(t.contexts)||"object"!==a(t.contexts[""]))throw new TypeError("Locale '".concat(e,"' invalid compact format"));this.locales[e.toLowerCase()]=t.contexts[""]}},{key:"useLocale",value:function(e){var t=e.toLowerCase(),r=this.locales[t];if(!r)throw new RangeError("Locale '".concat(e,"' not found"));return this.activeName=p[t]||t,this.activeLocale=r,this.activeLocale}},{key:"getLocaleName",value:function(){return this.activeName}},{key:"getLocaleNames",value:function(){return Object.keys(this.locales).sort()}},{key:"ordinal",value:function(e,t){var r=t&&t.toLowerCase()||this.activeName;if(!r)return this.getEnOrdinal(e);switch(r){case"en":case"s":case"a":case"ashkenazi":case"ashkenazi_litvish":case"ashkenazi_poylish":case"ashkenazi_standard":return this.getEnOrdinal(e);case"es":return e+"º";case"h":case"he":case"he-x-nonikud":return String(e);default:return e+"."}}},{key:"getEnOrdinal",value:function(e){var t=["th","st","nd","rd"],r=e%100;return e+(t[(r-20)%10]||t[r]||t[0])}},{key:"hebrewStripNikkud",value:function(e){return e.replace(/[\u0590-\u05bd]/g,"").replace(/[\u05bf-\u05c7]/g,"")}}]),e}();c(A,"locales",Object.create(null)),c(A,"activeLocale",null),c(A,"activeName",null),A.addLocale("en",k),A.addLocale("s",k),A.addLocale("",k),A.useLocale("en");var I={NISAN:1,IYYAR:2,SIVAN:3,TAMUZ:4,AV:5,ELUL:6,TISHREI:7,CHESHVAN:8,KISLEV:9,TEVET:10,SHVAT:11,ADAR_I:12,ADAR_II:13},N=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],E=[N.concat(["Adar","Nisan"]),N.concat(["Adar I","Adar II","Nisan"])],T=Object.create(null),D=-1373428;function L(e,t,r){if(e<1)throw new RangeError("hebrew2abs: invalid year ".concat(e));var n=r;if(t<7){for(var a=7;a<=H(e);a++)n+=R(a,e);for(var o=1;o<t;o++)n+=R(o,e)}else for(var u=7;u<t;u++)n+=R(u,e);return D+V(e)+n-1}function M(e){return D+V(e)}function S(e){if("number"!=typeof e||isNaN(e))throw new TypeError("invalid parameter to abs2hebrew ".concat(e));if((e=Math.trunc(e))<=D)throw new RangeError("abs2hebrew: ".concat(e," is before epoch"));for(var t=Math.floor((e-D)/365.24682220597794);M(t)<=e;)++t;for(var r=e<L(--t,1,1)?7:1;e>L(t,r,R(r,t));)++r;return{yy:t,mm:r,dd:1+e-L(t,r,1)}}function Y(e){return(1+7*e)%19<7}function H(e){return 12+Y(e)}function R(e,t){switch(e){case 2:case 4:case 6:case 10:case 13:return 29}return 12===e&&!Y(t)||8===e&&!_(t)||9===e&&C(t)?29:30}function O(e,t){if("number"!=typeof e||isNaN(e)||e<1||e>14)throw new TypeError("bad month argument ".concat(e));return E[+Y(t)][e]}function V(e){var t=T[e]=T[e]||function(e){var t=e-1,r=235*Math.floor(t/19)+t%19*12+Math.floor((t%19*7+1)/19),n=204+r%1080*793,a=5+12*r+793*Math.floor(r/1080)+Math.floor(n/1080),o=n%1080+a%24*1080,u=1+29*r+Math.floor(a/24),i=u+(o>=19440||2==u%7&&o>=9924&&!Y(e)||1==u%7&&o>=16789&&Y(t));return i+(i%7==0||i%7==3||i%7==5)}(e);return t}function F(e){return V(e+1)-V(e)}function _(e){return F(e)%10==5}function C(e){return F(e)%10==3}function j(e){throw new TypeError(e)}var x="day",z="week",U="month",K="year",B={d:x,w:z,M:U,y:K},P={day:x,week:z,month:U,year:K},J=function(){function e(t,r,n){if(o(this,e),2==arguments.length||arguments.length>3)throw new TypeError("HDate constructor requires 0, 1 or 3 arguments");if(3==arguments.length){if(this.day=this.month=1,n=parseInt(n,10),isNaN(n))throw new TypeError("HDate called with bad year argument: ".concat(n));if(this.year=n,this.setMonth(r),t=parseInt(t,10),isNaN(t))throw new TypeError("HDate called with bad day argument: ".concat(t));this.setDate(t)}else{void 0===t&&(t=new Date);var a="number"!=typeof t||isNaN(t)?m(t)?d(t):e.isHDate(t)?{dd:t.day,mm:t.month,yy:t.year}:j("HDate called with bad argument: ".concat(t)):t,u="number"==typeof a,i=u?S(a):a;this.day=i.dd,this.month=i.mm,this.year=i.yy,u&&(this.abs0=a)}}return i(e,[{key:"getFullYear",value:function(){return this.year}},{key:"isLeapYear",value:function(){return Y(this.year)}},{key:"getMonth",value:function(){return this.month}},{key:"getTishreiMonth",value:function(){var e=H(this.getFullYear());return(this.getMonth()+e-6)%e||e}},{key:"daysInMonth",value:function(){return R(this.getMonth(),this.getFullYear())}},{key:"getDate",value:function(){return this.day}},{key:"getDay",value:function(){return f(this.abs(),7)}},{key:"setFullYear",value:function(e){return this.year=e,Z(this),this}},{key:"setMonth",value:function(t){return this.month=e.monthNum(t),Z(this),this}},{key:"setDate",value:function(e){return this.day=e,Z(this),this}},{key:"greg",value:function(){return b(this.abs())}},{key:"abs",value:function(){return"number"!=typeof this.abs0&&(this.abs0=L(this.year,this.month,this.day)),this.abs0}},{key:"getMonthName",value:function(){return O(this.getMonth(),this.getFullYear())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t||A.getLocaleName(),a=this.getDate(),o=A.gettext(this.getMonthName(),n),u=A.ordinal(a,n),i=e.getDayOfTranslation(n),c="".concat(u).concat(i," ").concat(o);if(r){var s=this.getFullYear();return"".concat(c,", ").concat(s)}return c}},{key:"renderGematriya",value:function(){var e=this.getDate(),t=A.gettext(this.getMonthName(),"he"),r=this.getFullYear();return n(e)+" "+t+" "+n(r)}},{key:"before",value:function(e){return q(e,this,-1)}},{key:"onOrBefore",value:function(e){return q(e,this,0)}},{key:"nearest",value:function(e){return q(e,this,3)}},{key:"onOrAfter",value:function(e){return q(e,this,6)}},{key:"after",value:function(e){return q(e,this,7)}},{key:"next",value:function(){return new e(this.abs()+1)}},{key:"prev",value:function(){return new e(this.abs()-1)}},{key:"add",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"d";if(!(t=parseInt(t,10)))return new e(this);if((r=e.standardizeUnits(r))===x)return new e(this.abs()+t);if(r===z)return new e(this.abs()+7*t);if(r===K)return new e(this.getDate(),this.getMonth(),this.getFullYear()+t);if(r===U){var n=new e(this),a=t>0?1:-1;t=Math.abs(t);for(var o=0;o<t;o++)n=new e(n.abs()+a*n.daysInMonth());return n}}},{key:"subtract",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"d";return this.add(-1*e,t)}},{key:"deltaDays",value:function(t){if(!e.isHDate(t))throw new TypeError("Bad argument: ".concat(t));return this.abs()-t.abs()}},{key:"isSameDate",value:function(t){return!!e.isHDate(t)&&(this.year==t.year&&this.month==t.month&&this.day==t.day)}},{key:"toString",value:function(){var e=this.getDate(),t=this.getFullYear(),r=this.getMonthName();return"".concat(e," ").concat(r," ").concat(t)}}],[{key:"hebrew2abs",value:function(e,t,r){return L(e,t,r)}},{key:"abs2hebrew",value:function(e){return S(e)}},{key:"getDayOfTranslation",value:function(e){switch(e){case"en":case"s":case"a":case"ashkenazi":return" of"}var t=A.lookupTranslation("of",e);return t?" "+t:"ashkenazi"===e.substring(0,9)?" of":""}},{key:"standardizeUnits",value:function(e){var t=B[e]||String(e||"").toLowerCase().replace(/s$/,"");return P[t]||j("Invalid units '".concat(e,"'"))}},{key:"isLeapYear",value:function(e){return Y(e)}},{key:"monthsInYear",value:function(e){return H(e)}},{key:"daysInMonth",value:function(e,t){return R(e,t)}},{key:"getMonthName",value:function(e,t){return O(e,t)}},{key:"monthNum",value:function(t){if("number"==typeof t){if(isNaN(t)||t>14)throw new RangeError("Invalid month number: ".concat(t));return t}return t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57?parseInt(t,10):e.monthFromName(t)}},{key:"daysInYear",value:function(e){return F(e)}},{key:"longCheshvan",value:function(e){return _(e)}},{key:"shortKislev",value:function(e){return C(e)}},{key:"monthFromName",value:function(e){if("number"==typeof e){if(isNaN(e)||e<1||e>14)throw new RangeError("Invalid month name: ".concat(e));return e}var t=e.toLowerCase();switch(t[0]){case"n":case"נ":if("o"==t[1])break;return I.NISAN;case"i":return I.IYYAR;case"e":return I.ELUL;case"c":case"ח":return I.CHESHVAN;case"k":case"כ":return I.KISLEV;case"s":switch(t[1]){case"i":return I.SIVAN;case"h":return I.SHVAT}case"t":switch(t[1]){case"a":return I.TAMUZ;case"i":return I.TISHREI;case"e":return I.TEVET}break;case"a":switch(t[1]){case"v":return I.AV;case"d":return/(1|[^i]i|a|א)$/i.test(e)?I.ADAR_I:I.ADAR_II}break;case"ס":return I.SIVAN;case"ט":return I.TEVET;case"ש":return I.SHVAT;case"א":switch(t[1]){case"ב":return I.AV;case"ד":return/(1|[^i]i|a|א)$/i.test(e)?I.ADAR_I:I.ADAR_II;case"י":return I.IYYAR;case"ל":return I.ELUL}break;case"ת":switch(t[1]){case"מ":return I.TAMUZ;case"ש":return I.TISHREI}}throw new RangeError("Unable to parse month name: ".concat(e))}},{key:"dayOnOrBefore",value:function(e,t){return t-(t-e)%7}},{key:"isHDate",value:function(e){return null!==e&&"object"===a(e)&&"number"==typeof e.year&&"number"==typeof e.month&&"number"==typeof e.day&&"function"==typeof e.greg&&"function"==typeof e.abs}}]),e}();function Z(e){$(e),function(e){e.day<1&&(e.month==I.TISHREI&&(e.year-=1),e.day+=R(e.month,e.year),e.month-=1,Z(e));e.day>R(e.month,e.year)&&(e.month===I.ELUL&&(e.year+=1),e.day-=R(e.month,e.year),e.month+=1,Z(e));$(e)}(e)}function $(e){e.month!==I.ADAR_II||e.isLeapYear()?e.month<1?(e.month+=H(e.year),e.year-=1,Z(e)):e.month>H(e.year)&&(e.month-=H(e.year),e.year+=1,Z(e)):(e.month-=1,Z(e)),delete e.abs0}function q(e,t,r){return new J(J.dayOnOrBefore(e,t.abs()+r))}var G=I.NISAN,Q=I.CHESHVAN,W=I.KISLEV,X=I.TEVET,ee=I.SHVAT,te=I.ADAR_I,re=I.ADAR_II;var ne={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}}};A.addLocale("he",ne),A.addLocale("h",ne);var ae=ne.contexts[""],oe={};return Object.keys(ae).forEach((function(e){oe[e]=[A.hebrewStripNikkud(ae[e][0])]})),A.addLocale("he-x-NoNikud",{headers:ne.headers,contexts:{"":oe}}),e.HDate=J,e.Locale=A,e.gematriya=n,e.getBirthdayOrAnniversary=function(e,t){var r=J.isHDate(t)?t:new J(t),n=r.getFullYear();if(!(e<=n)){var a=Y(n),o=r.getMonth(),u=r.getDate();return o==te&&!a||o==re&&a?o=H(e):o!=Q||30!=u||_(e)?o==W&&30==u&&C(e)?(o=X,u=1):o==te&&30==u&&a&&!Y(e)&&(o=G,u=1):(o=W,u=1),new J(u,o,e)}},e.getYahrzeit=function(e,t){var r=J.isHDate(t)?t:new J(t),n={yy:r.getFullYear(),mm:r.getMonth(),dd:r.getDate()};if(!(e<=n.yy))return n.mm!=Q||30!=n.dd||_(n.yy+1)?n.mm==W&&30==n.dd&&C(n.yy+1)?n=S(L(e,X,1)-1):n.mm==re?n.mm=H(e):n.mm!=te||30!=n.dd||Y(e)||(n.dd=30,n.mm=ee):n=S(L(e,W,1)-1),n.mm!=Q||30!=n.dd||_(e)?n.mm==W&&30==n.dd&&C(e)&&(n.mm=X,n.dd=1):(n.mm=W,n.dd=1),new J(n.dd,n.mm,e)},e.greg=w,e.months=I,e.version="3.48.2",e}({});
1
+ /*! @hebcal/core v3.48.4 */
2
+ var hebcal=function(e){"use strict";function t(e){switch(e){case 1:return"א";case 2:return"ב";case 3:return"ג";case 4:return"ד";case 5:return"ה";case 6:return"ו";case 7:return"ז";case 8:return"ח";case 9:return"ט";case 10:return"י";case 20:return"כ";case 30:return"ל";case 40:return"מ";case 50:return"נ";case 60:return"ס";case 70:return"ע";case 80:return"פ";case 90:return"צ";case 100:return"ק";case 200:return"ר";case 300:return"ש";case 400:return"ת";default:return"*INVALID*"}}function r(e){for(var t=[];e>0;){if(15===e||16===e){t.push(9),t.push(e-9);break}var r=100,n=void 0;for(n=400;n>e;n-=r)n===r&&(r/=10);t.push(n),e-=n}return t}function n(e){var n=parseInt(e,10);if(!n)throw new TypeError("invalid parameter to gematriya ".concat(e));var a="",o=Math.floor(n/1e3);if(o>0&&5!==o){for(var u=r(o),i=0;i<u.length;i++)a+=t(u[i]);a+="׳"}var c=r(n%1e3);if(1==c.length)return a+t(c[0])+"׳";for(var s=0;s<c.length;s++)s+1===c.length&&(a+="״"),a+=t(c[s]);return a}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function i(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var h=[0,31,28,31,30,31,30,31,31,30,31,30,31],l=[h,h.slice()];function f(e,t){return e-t*Math.floor(e/t)}function y(e,t){return Math.floor(e/t)}function v(e){return!(e%4||!(e%100)&&e%400)}function m(e){return"object"===a(e)&&Date.prototype===e.__proto__}function d(e){if(!m(e))throw new TypeError("Argument not a Date: ".concat(e));return g(e.getFullYear(),e.getMonth()+1,e.getDate())}function g(e,t,r){var n=e-1;return 365*n+y(n,4)-y(n,100)+y(n,400)+y(367*t-362,12)+(t<=2?0:v(e)?-1:-2)+r}function b(e){if("number"!=typeof e)throw new TypeError("Argument not a Number: ".concat(e));var t=function(e){var t=e-1,r=y(t,146097),n=f(t,146097),a=y(n,36524),o=f(n,36524),u=y(o,1461),i=y(f(o,1461),365),c=400*r+100*a+4*u+i;return 4!=a&&4!=i?c+1:c}(e=Math.trunc(e)),r=y(12*(e-g(t,1,1)+(e<g(t,3,1)?0:v(t)?1:2))+373,367),n=e-g(t,r,1)+1,a=new Date(t,r-1,n);return t<100&&t>=0&&a.setFullYear(t),a}l[1][2]=29;var w=function(){function e(){o(this,e)}return i(e,null,[{key:"isLeapYear",value:function(e){return v(e)}},{key:"daysInMonth",value:function(e,t){return function(e,t){return l[+v(t)][e]}(e,t)}},{key:"isDate",value:function(e){return m(e)}},{key:"dayOfYear",value:function(e){if(!m(e))throw new TypeError("Argument not a Date: ".concat(e));var t=e.getMonth(),r=e.getDate()+31*t;return t>1&&(r-=Math.floor((4*(t+1)+23)/10),v(e.getFullYear())&&r++),r}},{key:"greg2abs",value:function(e){return d(e)}},{key:"abs2greg",value:function(e){return b(e)}}]),e}();c(w,"monthNames",["","January","February","March","April","May","June","July","August","September","October","November","December"]);var k={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},p={h:"he",a:"ashkenazi",s:"en","":"en"},A=function(){function e(){o(this,e)}return i(e,null,[{key:"lookupTranslation",value:function(e,t){var r=t&&t.toLowerCase(),n=("string"==typeof t&&this.locales[r]||this.activeLocale)[e];if(n&&n.length&&n[0].length)return n[0]}},{key:"gettext",value:function(e,t){var r=this.lookupTranslation(e,t);return void 0===r?e:r}},{key:"addLocale",value:function(e,t){if("object"!==a(t.contexts)||"object"!==a(t.contexts[""]))throw new TypeError("Locale '".concat(e,"' invalid compact format"));this.locales[e.toLowerCase()]=t.contexts[""]}},{key:"useLocale",value:function(e){var t=e.toLowerCase(),r=this.locales[t];if(!r)throw new RangeError("Locale '".concat(e,"' not found"));return this.activeName=p[t]||t,this.activeLocale=r,this.activeLocale}},{key:"getLocaleName",value:function(){return this.activeName}},{key:"getLocaleNames",value:function(){return Object.keys(this.locales).sort()}},{key:"ordinal",value:function(e,t){var r=t&&t.toLowerCase()||this.activeName;if(!r)return this.getEnOrdinal(e);switch(r){case"en":case"s":case"a":case"ashkenazi":case"ashkenazi_litvish":case"ashkenazi_poylish":case"ashkenazi_standard":return this.getEnOrdinal(e);case"es":return e+"º";case"h":case"he":case"he-x-nonikud":return String(e);default:return e+"."}}},{key:"getEnOrdinal",value:function(e){var t=["th","st","nd","rd"],r=e%100;return e+(t[(r-20)%10]||t[r]||t[0])}},{key:"hebrewStripNikkud",value:function(e){return e.replace(/[\u0590-\u05bd]/g,"").replace(/[\u05bf-\u05c7]/g,"")}}]),e}();c(A,"locales",Object.create(null)),c(A,"activeLocale",null),c(A,"activeName",null),A.addLocale("en",k),A.addLocale("s",k),A.addLocale("",k),A.useLocale("en");var I={NISAN:1,IYYAR:2,SIVAN:3,TAMUZ:4,AV:5,ELUL:6,TISHREI:7,CHESHVAN:8,KISLEV:9,TEVET:10,SHVAT:11,ADAR_I:12,ADAR_II:13},N=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],E=[N.concat(["Adar","Nisan"]),N.concat(["Adar I","Adar II","Nisan"])],T=Object.create(null),D=-1373428;function L(e,t,r){if(e<1)throw new RangeError("hebrew2abs: invalid year ".concat(e));var n=r;if(t<7){for(var a=7;a<=H(e);a++)n+=R(a,e);for(var o=1;o<t;o++)n+=R(o,e)}else for(var u=7;u<t;u++)n+=R(u,e);return D+V(e)+n-1}function M(e){return D+V(e)}function S(e){if("number"!=typeof e||isNaN(e))throw new TypeError("invalid parameter to abs2hebrew ".concat(e));if((e=Math.trunc(e))<=D)throw new RangeError("abs2hebrew: ".concat(e," is before epoch"));for(var t=Math.floor((e-D)/365.24682220597794);M(t)<=e;)++t;for(var r=e<L(--t,1,1)?7:1;e>L(t,r,R(r,t));)++r;return{yy:t,mm:r,dd:1+e-L(t,r,1)}}function Y(e){return(1+7*e)%19<7}function H(e){return 12+Y(e)}function R(e,t){switch(e){case 2:case 4:case 6:case 10:case 13:return 29}return 12===e&&!Y(t)||8===e&&!_(t)||9===e&&C(t)?29:30}function O(e,t){if("number"!=typeof e||isNaN(e)||e<1||e>14)throw new TypeError("bad month argument ".concat(e));return E[+Y(t)][e]}function V(e){var t=T[e]=T[e]||function(e){var t=e-1,r=235*Math.floor(t/19)+t%19*12+Math.floor((t%19*7+1)/19),n=204+r%1080*793,a=5+12*r+793*Math.floor(r/1080)+Math.floor(n/1080),o=n%1080+a%24*1080,u=1+29*r+Math.floor(a/24),i=u+(o>=19440||2==u%7&&o>=9924&&!Y(e)||1==u%7&&o>=16789&&Y(t));return i+(i%7==0||i%7==3||i%7==5)}(e);return t}function F(e){return V(e+1)-V(e)}function _(e){return F(e)%10==5}function C(e){return F(e)%10==3}function j(e){throw new TypeError(e)}var x="day",z="week",U="month",K="year",B={d:x,w:z,M:U,y:K},P={day:x,week:z,month:U,year:K},J=function(){function e(t,r,n){if(o(this,e),2==arguments.length||arguments.length>3)throw new TypeError("HDate constructor requires 0, 1 or 3 arguments");if(3==arguments.length){if(this.day=this.month=1,n=parseInt(n,10),isNaN(n))throw new TypeError("HDate called with bad year argument: ".concat(n));if(this.year=n,this.setMonth(r),t=parseInt(t,10),isNaN(t))throw new TypeError("HDate called with bad day argument: ".concat(t));this.setDate(t)}else{void 0===t&&(t=new Date);var a="number"!=typeof t||isNaN(t)?m(t)?d(t):e.isHDate(t)?{dd:t.day,mm:t.month,yy:t.year}:j("HDate called with bad argument: ".concat(t)):t,u="number"==typeof a,i=u?S(a):a;this.day=i.dd,this.month=i.mm,this.year=i.yy,u&&(this.abs0=a)}}return i(e,[{key:"getFullYear",value:function(){return this.year}},{key:"isLeapYear",value:function(){return Y(this.year)}},{key:"getMonth",value:function(){return this.month}},{key:"getTishreiMonth",value:function(){var e=H(this.getFullYear());return(this.getMonth()+e-6)%e||e}},{key:"daysInMonth",value:function(){return R(this.getMonth(),this.getFullYear())}},{key:"getDate",value:function(){return this.day}},{key:"getDay",value:function(){return f(this.abs(),7)}},{key:"setFullYear",value:function(e){return this.year=e,Z(this),this}},{key:"setMonth",value:function(t){return this.month=e.monthNum(t),Z(this),this}},{key:"setDate",value:function(e){return this.day=e,Z(this),this}},{key:"greg",value:function(){return b(this.abs())}},{key:"abs",value:function(){return"number"!=typeof this.abs0&&(this.abs0=L(this.year,this.month,this.day)),this.abs0}},{key:"getMonthName",value:function(){return O(this.getMonth(),this.getFullYear())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t||A.getLocaleName(),a=this.getDate(),o=A.gettext(this.getMonthName(),n),u=A.ordinal(a,n),i=e.getDayOfTranslation(n),c="".concat(u).concat(i," ").concat(o);if(r){var s=this.getFullYear();return"".concat(c,", ").concat(s)}return c}},{key:"renderGematriya",value:function(){var e=this.getDate(),t=A.gettext(this.getMonthName(),"he"),r=this.getFullYear();return n(e)+" "+t+" "+n(r)}},{key:"before",value:function(e){return q(e,this,-1)}},{key:"onOrBefore",value:function(e){return q(e,this,0)}},{key:"nearest",value:function(e){return q(e,this,3)}},{key:"onOrAfter",value:function(e){return q(e,this,6)}},{key:"after",value:function(e){return q(e,this,7)}},{key:"next",value:function(){return new e(this.abs()+1)}},{key:"prev",value:function(){return new e(this.abs()-1)}},{key:"add",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"d";if(!(t=parseInt(t,10)))return new e(this);if((r=e.standardizeUnits(r))===x)return new e(this.abs()+t);if(r===z)return new e(this.abs()+7*t);if(r===K)return new e(this.getDate(),this.getMonth(),this.getFullYear()+t);if(r===U){var n=new e(this),a=t>0?1:-1;t=Math.abs(t);for(var o=0;o<t;o++)n=new e(n.abs()+a*n.daysInMonth());return n}}},{key:"subtract",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"d";return this.add(-1*e,t)}},{key:"deltaDays",value:function(t){if(!e.isHDate(t))throw new TypeError("Bad argument: ".concat(t));return this.abs()-t.abs()}},{key:"isSameDate",value:function(t){return!!e.isHDate(t)&&(this.year==t.year&&this.month==t.month&&this.day==t.day)}},{key:"toString",value:function(){var e=this.getDate(),t=this.getFullYear(),r=this.getMonthName();return"".concat(e," ").concat(r," ").concat(t)}}],[{key:"hebrew2abs",value:function(e,t,r){return L(e,t,r)}},{key:"abs2hebrew",value:function(e){return S(e)}},{key:"getDayOfTranslation",value:function(e){switch(e){case"en":case"s":case"a":case"ashkenazi":return" of"}var t=A.lookupTranslation("of",e);return t?" "+t:"ashkenazi"===e.substring(0,9)?" of":""}},{key:"standardizeUnits",value:function(e){var t=B[e]||String(e||"").toLowerCase().replace(/s$/,"");return P[t]||j("Invalid units '".concat(e,"'"))}},{key:"isLeapYear",value:function(e){return Y(e)}},{key:"monthsInYear",value:function(e){return H(e)}},{key:"daysInMonth",value:function(e,t){return R(e,t)}},{key:"getMonthName",value:function(e,t){return O(e,t)}},{key:"monthNum",value:function(t){if("number"==typeof t){if(isNaN(t)||t>14)throw new RangeError("Invalid month number: ".concat(t));return t}return t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57?parseInt(t,10):e.monthFromName(t)}},{key:"daysInYear",value:function(e){return F(e)}},{key:"longCheshvan",value:function(e){return _(e)}},{key:"shortKislev",value:function(e){return C(e)}},{key:"monthFromName",value:function(e){if("number"==typeof e){if(isNaN(e)||e<1||e>14)throw new RangeError("Invalid month name: ".concat(e));return e}var t=e.toLowerCase();switch(t[0]){case"n":case"נ":if("o"==t[1])break;return I.NISAN;case"i":return I.IYYAR;case"e":return I.ELUL;case"c":case"ח":return I.CHESHVAN;case"k":case"כ":return I.KISLEV;case"s":switch(t[1]){case"i":return I.SIVAN;case"h":return I.SHVAT}case"t":switch(t[1]){case"a":return I.TAMUZ;case"i":return I.TISHREI;case"e":return I.TEVET}break;case"a":switch(t[1]){case"v":return I.AV;case"d":return/(1|[^i]i|a|א)$/i.test(e)?I.ADAR_I:I.ADAR_II}break;case"ס":return I.SIVAN;case"ט":return I.TEVET;case"ש":return I.SHVAT;case"א":switch(t[1]){case"ב":return I.AV;case"ד":return/(1|[^i]i|a|א)$/i.test(e)?I.ADAR_I:I.ADAR_II;case"י":return I.IYYAR;case"ל":return I.ELUL}break;case"ת":switch(t[1]){case"מ":return I.TAMUZ;case"ש":return I.TISHREI}}throw new RangeError("Unable to parse month name: ".concat(e))}},{key:"dayOnOrBefore",value:function(e,t){return t-(t-e)%7}},{key:"isHDate",value:function(e){return null!==e&&"object"===a(e)&&"number"==typeof e.year&&"number"==typeof e.month&&"number"==typeof e.day&&"function"==typeof e.greg&&"function"==typeof e.abs}}]),e}();function Z(e){$(e),function(e){e.day<1&&(e.month==I.TISHREI&&(e.year-=1),e.day+=R(e.month,e.year),e.month-=1,Z(e));e.day>R(e.month,e.year)&&(e.month===I.ELUL&&(e.year+=1),e.day-=R(e.month,e.year),e.month+=1,Z(e));$(e)}(e)}function $(e){e.month!==I.ADAR_II||e.isLeapYear()?e.month<1?(e.month+=H(e.year),e.year-=1,Z(e)):e.month>H(e.year)&&(e.month-=H(e.year),e.year+=1,Z(e)):(e.month-=1,Z(e)),delete e.abs0}function q(e,t,r){return new J(J.dayOnOrBefore(e,t.abs()+r))}var G=I.NISAN,Q=I.CHESHVAN,W=I.KISLEV,X=I.TEVET,ee=I.SHVAT,te=I.ADAR_I,re=I.ADAR_II;var ne={headers:{"plural-forms":"nplurals=2; plural=(n > 1);"},contexts:{"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}}};A.addLocale("he",ne),A.addLocale("h",ne);var ae=ne.contexts[""],oe={};return Object.keys(ae).forEach((function(e){oe[e]=[A.hebrewStripNikkud(ae[e][0])]})),A.addLocale("he-x-NoNikud",{headers:ne.headers,contexts:{"":oe}}),e.HDate=J,e.Locale=A,e.gematriya=n,e.getBirthdayOrAnniversary=function(e,t){var r=J.isHDate(t)?t:new J(t),n=r.getFullYear();if(!(e<=n)){var a=Y(n),o=r.getMonth(),u=r.getDate();return o==te&&!a||o==re&&a?o=H(e):o!=Q||30!=u||_(e)?o==W&&30==u&&C(e)?(o=X,u=1):o==te&&30==u&&a&&!Y(e)&&(o=G,u=1):(o=W,u=1),new J(u,o,e)}},e.getYahrzeit=function(e,t){var r=J.isHDate(t)?t:new J(t),n={yy:r.getFullYear(),mm:r.getMonth(),dd:r.getDate()};if(!(e<=n.yy))return n.mm!=Q||30!=n.dd||_(n.yy+1)?n.mm==W&&30==n.dd&&C(n.yy+1)?n=S(L(e,X,1)-1):n.mm==re?n.mm=H(e):n.mm!=te||30!=n.dd||Y(e)||(n.dd=30,n.mm=ee):n=S(L(e,W,1)-1),n.mm!=Q||30!=n.dd||_(e)?n.mm==W&&30==n.dd&&C(e)&&(n.mm=X,n.dd=1):(n.mm=W,n.dd=1),new J(n.dd,n.mm,e)},e.greg=w,e.months=I,e.version="3.48.4",e}({});
package/dist/hdate.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  'use strict';
3
3
 
4
4
  const GERESH = '׳';
@@ -1739,7 +1739,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
1739
1739
  return new HDate(day, month, hyear);
1740
1740
  }
1741
1741
 
1742
- const version="3.48.2";
1742
+ const version="3.48.4";
1743
1743
 
1744
1744
  const headers={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts={"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}};var poHeMin = {headers:headers,contexts:contexts};
1745
1745
 
package/dist/hdate.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  const GERESH = '׳';
3
3
  const GERSHAYIM = '״';
4
4
 
@@ -1770,7 +1770,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
1770
1770
  return new HDate(day, month, hyear);
1771
1771
  }
1772
1772
 
1773
- const version="3.48.2";
1773
+ const version="3.48.4";
1774
1774
 
1775
1775
  const headers={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts={"":{Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"]}};var poHeMin = {headers:headers,contexts:contexts};
1776
1776
 
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1,2 +1,2 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  var hebcal=function(r){"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(r)}var n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e(r,t){return r-t*Math.floor(r/t)}function o(r,t){return Math.floor(r/t)}function a(r){return!(r%4||!(r%100)&&r%400)}function u(r,t,n){var e=r-1;return 365*e+o(e,4)-o(e,100)+o(e,400)+o(367*t-362,12)+(t<=2?0:a(r)?-1:-2)+n}[n,n.slice()][1][2]=29;var c=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],f=[c.concat(["Adar","Nisan"]),c.concat(["Adar I","Adar II","Nisan"])],i=Object.create(null),h=-1373428;function s(r,t,n){if(r<1)throw new RangeError("hebrew2abs: invalid year ".concat(r));var e=n;if(t<7){for(var o=7;o<=y(r);o++)e+=v(o,r);for(var a=1;a<t;a++)e+=v(a,r)}else for(var u=7;u<t;u++)e+=v(u,r);return h+m(r)+e-1}function l(r){return h+m(r)}function b(r){return(1+7*r)%19<7}function y(r){return 12+b(r)}function v(r,t){switch(r){case 2:case 4:case 6:case 10:case 13:return 29}return 12===r&&!b(t)||8===r&&!w(t)||9===r&&A(t)?29:30}function m(r){var t=i[r]=i[r]||function(r){var t=r-1,n=235*Math.floor(t/19)+t%19*12+Math.floor((t%19*7+1)/19),e=204+n%1080*793,o=5+12*n+793*Math.floor(n/1080)+Math.floor(e/1080),a=e%1080+o%24*1080,u=1+29*n+Math.floor(o/24),c=u+(a>=19440||2==u%7&&a>=9924&&!b(r)||1==u%7&&a>=16789&&b(t));return c+(c%7==0||c%7==3||c%7==5)}(r);return t}function p(r){return m(r+1)-m(r)}function w(r){return p(r)%10==5}function A(r){return p(r)%10==3}var I={abs2hebrew:function(r){if("number"!=typeof r||isNaN(r))throw new TypeError("invalid parameter to abs2hebrew ".concat(r));if((r=Math.trunc(r))<=h)throw new RangeError("abs2hebrew: ".concat(r," is before epoch"));for(var t=Math.floor((r-h)/365.24682220597794);l(t)<=r;)++t;for(var n=r<s(--t,1,1)?7:1;r>s(t,n,v(n,t));)++n;return{yy:t,mm:n,dd:1+r-s(t,n,1)}},daysInMonth:v,daysInYear:p,getMonthName:function(r,t){if("number"!=typeof r||isNaN(r)||r<1||r>14)throw new TypeError("bad month argument ".concat(r));return f[+b(t)][r]},hebrew2abs:s,isLeapYear:b,longCheshvan:w,months:{NISAN:1,IYYAR:2,SIVAN:3,TAMUZ:4,AV:5,ELUL:6,TISHREI:7,CHESHVAN:8,KISLEV:9,TEVET:10,SHVAT:11,ADAR_I:12,ADAR_II:13},monthsInYear:y,shortKislev:A};return r.abs2greg=function(r){if("number"!=typeof r)throw new TypeError("Argument not a Number: ".concat(r));var t=function(r){var t=r-1,n=o(t,146097),a=e(t,146097),u=o(a,36524),c=e(a,36524),f=o(c,1461),i=o(e(c,1461),365),h=400*n+100*u+4*f+i;return 4!=u&&4!=i?h+1:h}(r=Math.trunc(r)),n=o(12*(r-u(t,1,1)+(r<u(t,3,1)?0:a(t)?1:2))+373,367),c=r-u(t,n,1)+1,f=new Date(t,n-1,c);return t<100&&t>=0&&f.setFullYear(t),f},r.greg2abs=function(r){if("object"!==t(n=r)||Date.prototype!==n.__proto__)throw new TypeError("Argument not a Date: ".concat(r));var n;return u(r.getFullYear(),r.getMonth()+1,r.getDate())},r.hdate=I,r}({});
package/dist/hdate0.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  /*
3
3
  * More minimal greg routines
4
4
  */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  'use strict';
3
3
 
4
4
  /*
@@ -353,7 +353,7 @@ function num2digits(num) {
353
353
  * @param {number} number
354
354
  * @return {string}
355
355
  */
356
- function gematriya$1(number) {
356
+ function gematriya(number) {
357
357
  const num = parseInt(number, 10);
358
358
  if (!num) {
359
359
  throw new TypeError(`invalid parameter to gematriya ${number}`);
@@ -1163,7 +1163,7 @@ class HDate {
1163
1163
  const d = this.getDate();
1164
1164
  const m = Locale.gettext(this.getMonthName(), 'he');
1165
1165
  const y = this.getFullYear();
1166
- return gematriya$1(d) + ' ' + m + ' ' + gematriya$1(y);
1166
+ return gematriya(d) + ' ' + m + ' ' + gematriya(y);
1167
1167
  }
1168
1168
 
1169
1169
  /**
@@ -1892,7 +1892,7 @@ class HebrewDateEvent extends Event {
1892
1892
  const dd = hd.getDate();
1893
1893
  const mm = Locale.gettext(hd.getMonthName(), locale0);
1894
1894
  const yy = hd.getFullYear();
1895
- return gematriya$1(dd) + ' ' + mm + ' ' + gematriya$1(yy);
1895
+ return gematriya(dd) + ' ' + mm + ' ' + gematriya(yy);
1896
1896
  default:
1897
1897
  return hd.render(locale0, true);
1898
1898
  }
@@ -1921,7 +1921,7 @@ class HebrewDateEvent extends Event {
1921
1921
  case 'he-x-nonikud':
1922
1922
  const dd = hd.getDate();
1923
1923
  const mm = Locale.gettext(hd.getMonthName(), locale0);
1924
- return gematriya$1(dd) + ' ' + mm;
1924
+ return gematriya(dd) + ' ' + mm;
1925
1925
  default:
1926
1926
  return hd.render(locale0, false);
1927
1927
  }
@@ -1935,7 +1935,7 @@ class HebrewDateEvent extends Event {
1935
1935
  * @return {string}
1936
1936
  */
1937
1937
  static renderHebrew(day, monthName, fullYear) {
1938
- return gematriya$1(day) + ' ' + monthName + ' ' + gematriya$1(fullYear);
1938
+ return gematriya(day) + ' ' + monthName + ' ' + gematriya(fullYear);
1939
1939
  }
1940
1940
  }
1941
1941
 
@@ -3393,7 +3393,7 @@ class OmerEvent extends Event {
3393
3393
  render(locale) {
3394
3394
  locale = locale || Locale.getLocaleName();
3395
3395
  const omer = this.omer;
3396
- const nth = locale == 'he' ? gematriya$1(omer) : Locale.ordinal(omer, locale);
3396
+ const nth = locale == 'he' ? gematriya(omer) : Locale.ordinal(omer, locale);
3397
3397
  return nth + ' ' + Locale.gettext('day of the Omer', locale);
3398
3398
  }
3399
3399
  /**
@@ -3637,7 +3637,7 @@ class DafYomi {
3637
3637
  locale = locale.toLowerCase();
3638
3638
  }
3639
3639
  if (locale === 'he' || locale === 'he-x-nonikud') {
3640
- return Locale.gettext(this.name, locale) + ' דף ' + gematriya$1(this.blatt);
3640
+ return Locale.gettext(this.name, locale) + ' דף ' + gematriya(this.blatt);
3641
3641
  }
3642
3642
  return Locale.gettext(this.name, locale) + ' ' + this.blatt;
3643
3643
  }
@@ -5310,7 +5310,7 @@ class NachYomiEvent extends Event {
5310
5310
  * @param {NachYomi} nachYomi
5311
5311
  */
5312
5312
  constructor(date, nachYomi) {
5313
- super(date, `${nachYomi.k} ${nachYomi.v}`, flags.MISHNA_YOMI);
5313
+ super(date, `${nachYomi.k} ${nachYomi.v}`, flags.NACH_YOMI);
5314
5314
  this.nachYomi = nachYomi;
5315
5315
  }
5316
5316
  /**
@@ -5505,7 +5505,7 @@ class YerushalmiYomiEvent extends Event {
5505
5505
  }
5506
5506
  const name = Locale.gettext(this.daf.name, locale);
5507
5507
  if (locale === 'he' || locale === 'he-x-nonikud') {
5508
- return name + ' דף ' + gematriya$1(this.daf.blatt);
5508
+ return name + ' דף ' + gematriya(this.daf.blatt);
5509
5509
  }
5510
5510
  return name + ' ' + this.daf.blatt;
5511
5511
  }
@@ -5621,7 +5621,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
5621
5621
  return new HDate(day, month, hyear);
5622
5622
  }
5623
5623
 
5624
- var version="3.48.2";
5624
+ var version="3.48.4";
5625
5625
 
5626
5626
  var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};var contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"Achrei Mot":["Achrei Mos"],Bechukotai:["Bechukosai"],"Beha'alotcha":["Beha'aloscha"],Bereshit:["Bereshis"],Chukat:["Chukas"],"Erev Shavuot":["Erev Shavuos"],"Erev Sukkot":["Erev Sukkos"],"Ki Tavo":["Ki Savo"],"Ki Teitzei":["Ki Seitzei"],"Ki Tisa":["Ki Sisa"],Matot:["Matos"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"Shabbat Chazon":["Shabbos Chazon"],"Shabbat HaChodesh":["Shabbos HaChodesh"],"Shabbat HaGadol":["Shabbos HaGadol"],"Shabbat Nachamu":["Shabbos Nachamu"],"Shabbat Parah":["Shabbos Parah"],"Shabbat Shekalim":["Shabbos Shekalim"],"Shabbat Shuva":["Shabbos Shuvah"],"Shabbat Zachor":["Shabbos Zachor"],Shavuot:["Shavuos"],"Shavuot I":["Shavuos I"],"Shavuot II":["Shavuos II"],Shemot:["Shemos"],"Shmini Atzeret":["Shmini Atzeres"],"Simchat Torah":["Simchas Torah"],Sukkot:["Sukkos"],"Sukkot I":["Sukkos I"],"Sukkot II":["Sukkos II"],"Sukkot II (CH''M)":["Sukkos II (CH''M)"],"Sukkot III (CH''M)":["Sukkos III (CH''M)"],"Sukkot IV (CH''M)":["Sukkos IV (CH''M)"],"Sukkot V (CH''M)":["Sukkos V (CH''M)"],"Sukkot VI (CH''M)":["Sukkos VI (CH''M)"],"Sukkot VII (Hoshana Raba)":["Sukkos VII (Hoshana Raba)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"Ta'anit Esther":["Ta'anis Esther"],Toldot:["Toldos"],Vaetchanan:["Vaeschanan"],Yitro:["Yisro"],"Vezot Haberakhah":["Vezos Haberakhah"],Parashat:["Parshas"],"Leil Selichot":["Leil Selichos"],"Shabbat Mevarchim Chodesh":["Shabbos Mevorchim Chodesh"],"Shabbat Shirah":["Shabbos Shirah"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"],"Alot HaShachar":["Alos HaShachar"],"Kriat Shema, sof zeman":["Krias Shema, sof zman"],"Tefilah, sof zeman":["Tefilah, sof zman"],"Kriat Shema, sof zeman (MGA)":["Krias Shema, sof zman (MGA)"],"Tefilah, sof zeman (MGA)":["Tefilah, sof zman (MGA)"],"Chatzot HaLailah":["Chatzos HaLailah"],"Chatzot hayom":["Chatzos"],"Tzeit HaKochavim":["Tzeis HaKochavim"],"Birkat Hachamah":["Birkas Hachamah"],"Shushan Purim Katan":["Shushan Purim Koton"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
5627
5627
 
@@ -6789,7 +6789,7 @@ exports.TimedEvent = TimedEvent;
6789
6789
  exports.YerushalmiYomiEvent = YerushalmiYomiEvent;
6790
6790
  exports.Zmanim = Zmanim;
6791
6791
  exports.flags = flags;
6792
- exports.gematriya = gematriya$1;
6792
+ exports.gematriya = gematriya;
6793
6793
  exports.greg = greg;
6794
6794
  exports.months = months;
6795
6795
  exports.parshiot = parshiot;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.48.2 */
1
+ /*! @hebcal/core v3.48.4 */
2
2
  /*
3
3
  * More minimal greg routines
4
4
  */
@@ -351,7 +351,7 @@ function num2digits(num) {
351
351
  * @param {number} number
352
352
  * @return {string}
353
353
  */
354
- function gematriya$1(number) {
354
+ function gematriya(number) {
355
355
  const num = parseInt(number, 10);
356
356
  if (!num) {
357
357
  throw new TypeError(`invalid parameter to gematriya ${number}`);
@@ -1161,7 +1161,7 @@ class HDate {
1161
1161
  const d = this.getDate();
1162
1162
  const m = Locale.gettext(this.getMonthName(), 'he');
1163
1163
  const y = this.getFullYear();
1164
- return gematriya$1(d) + ' ' + m + ' ' + gematriya$1(y);
1164
+ return gematriya(d) + ' ' + m + ' ' + gematriya(y);
1165
1165
  }
1166
1166
 
1167
1167
  /**
@@ -1890,7 +1890,7 @@ class HebrewDateEvent extends Event {
1890
1890
  const dd = hd.getDate();
1891
1891
  const mm = Locale.gettext(hd.getMonthName(), locale0);
1892
1892
  const yy = hd.getFullYear();
1893
- return gematriya$1(dd) + ' ' + mm + ' ' + gematriya$1(yy);
1893
+ return gematriya(dd) + ' ' + mm + ' ' + gematriya(yy);
1894
1894
  default:
1895
1895
  return hd.render(locale0, true);
1896
1896
  }
@@ -1919,7 +1919,7 @@ class HebrewDateEvent extends Event {
1919
1919
  case 'he-x-nonikud':
1920
1920
  const dd = hd.getDate();
1921
1921
  const mm = Locale.gettext(hd.getMonthName(), locale0);
1922
- return gematriya$1(dd) + ' ' + mm;
1922
+ return gematriya(dd) + ' ' + mm;
1923
1923
  default:
1924
1924
  return hd.render(locale0, false);
1925
1925
  }
@@ -1933,7 +1933,7 @@ class HebrewDateEvent extends Event {
1933
1933
  * @return {string}
1934
1934
  */
1935
1935
  static renderHebrew(day, monthName, fullYear) {
1936
- return gematriya$1(day) + ' ' + monthName + ' ' + gematriya$1(fullYear);
1936
+ return gematriya(day) + ' ' + monthName + ' ' + gematriya(fullYear);
1937
1937
  }
1938
1938
  }
1939
1939
 
@@ -3391,7 +3391,7 @@ class OmerEvent extends Event {
3391
3391
  render(locale) {
3392
3392
  locale = locale || Locale.getLocaleName();
3393
3393
  const omer = this.omer;
3394
- const nth = locale == 'he' ? gematriya$1(omer) : Locale.ordinal(omer, locale);
3394
+ const nth = locale == 'he' ? gematriya(omer) : Locale.ordinal(omer, locale);
3395
3395
  return nth + ' ' + Locale.gettext('day of the Omer', locale);
3396
3396
  }
3397
3397
  /**
@@ -3635,7 +3635,7 @@ class DafYomi {
3635
3635
  locale = locale.toLowerCase();
3636
3636
  }
3637
3637
  if (locale === 'he' || locale === 'he-x-nonikud') {
3638
- return Locale.gettext(this.name, locale) + ' דף ' + gematriya$1(this.blatt);
3638
+ return Locale.gettext(this.name, locale) + ' דף ' + gematriya(this.blatt);
3639
3639
  }
3640
3640
  return Locale.gettext(this.name, locale) + ' ' + this.blatt;
3641
3641
  }
@@ -5308,7 +5308,7 @@ class NachYomiEvent extends Event {
5308
5308
  * @param {NachYomi} nachYomi
5309
5309
  */
5310
5310
  constructor(date, nachYomi) {
5311
- super(date, `${nachYomi.k} ${nachYomi.v}`, flags.MISHNA_YOMI);
5311
+ super(date, `${nachYomi.k} ${nachYomi.v}`, flags.NACH_YOMI);
5312
5312
  this.nachYomi = nachYomi;
5313
5313
  }
5314
5314
  /**
@@ -5503,7 +5503,7 @@ class YerushalmiYomiEvent extends Event {
5503
5503
  }
5504
5504
  const name = Locale.gettext(this.daf.name, locale);
5505
5505
  if (locale === 'he' || locale === 'he-x-nonikud') {
5506
- return name + ' דף ' + gematriya$1(this.daf.blatt);
5506
+ return name + ' דף ' + gematriya(this.daf.blatt);
5507
5507
  }
5508
5508
  return name + ' ' + this.daf.blatt;
5509
5509
  }
@@ -5619,7 +5619,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
5619
5619
  return new HDate(day, month, hyear);
5620
5620
  }
5621
5621
 
5622
- const version="3.48.2";
5622
+ const version="3.48.4";
5623
5623
 
5624
5624
  const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"Achrei Mot":["Achrei Mos"],Bechukotai:["Bechukosai"],"Beha'alotcha":["Beha'aloscha"],Bereshit:["Bereshis"],Chukat:["Chukas"],"Erev Shavuot":["Erev Shavuos"],"Erev Sukkot":["Erev Sukkos"],"Ki Tavo":["Ki Savo"],"Ki Teitzei":["Ki Seitzei"],"Ki Tisa":["Ki Sisa"],Matot:["Matos"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"Shabbat Chazon":["Shabbos Chazon"],"Shabbat HaChodesh":["Shabbos HaChodesh"],"Shabbat HaGadol":["Shabbos HaGadol"],"Shabbat Nachamu":["Shabbos Nachamu"],"Shabbat Parah":["Shabbos Parah"],"Shabbat Shekalim":["Shabbos Shekalim"],"Shabbat Shuva":["Shabbos Shuvah"],"Shabbat Zachor":["Shabbos Zachor"],Shavuot:["Shavuos"],"Shavuot I":["Shavuos I"],"Shavuot II":["Shavuos II"],Shemot:["Shemos"],"Shmini Atzeret":["Shmini Atzeres"],"Simchat Torah":["Simchas Torah"],Sukkot:["Sukkos"],"Sukkot I":["Sukkos I"],"Sukkot II":["Sukkos II"],"Sukkot II (CH''M)":["Sukkos II (CH''M)"],"Sukkot III (CH''M)":["Sukkos III (CH''M)"],"Sukkot IV (CH''M)":["Sukkos IV (CH''M)"],"Sukkot V (CH''M)":["Sukkos V (CH''M)"],"Sukkot VI (CH''M)":["Sukkos VI (CH''M)"],"Sukkot VII (Hoshana Raba)":["Sukkos VII (Hoshana Raba)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"Ta'anit Esther":["Ta'anis Esther"],Toldot:["Toldos"],Vaetchanan:["Vaeschanan"],Yitro:["Yisro"],"Vezot Haberakhah":["Vezos Haberakhah"],Parashat:["Parshas"],"Leil Selichot":["Leil Selichos"],"Shabbat Mevarchim Chodesh":["Shabbos Mevorchim Chodesh"],"Shabbat Shirah":["Shabbos Shirah"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"],"Alot HaShachar":["Alos HaShachar"],"Kriat Shema, sof zeman":["Krias Shema, sof zman"],"Tefilah, sof zeman":["Tefilah, sof zman"],"Kriat Shema, sof zeman (MGA)":["Krias Shema, sof zman (MGA)"],"Tefilah, sof zeman (MGA)":["Tefilah, sof zman (MGA)"],"Chatzot HaLailah":["Chatzos HaLailah"],"Chatzot hayom":["Chatzos"],"Tzeit HaKochavim":["Tzeis HaKochavim"],"Birkat Hachamah":["Birkas Hachamah"],"Shushan Purim Katan":["Shushan Purim Koton"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
5625
5625
 
@@ -6759,4 +6759,4 @@ function appendHolidayAndRelated(events, ev, options, candlesEv, dow) {
6759
6759
  return candlesEv;
6760
6760
  }
6761
6761
 
6762
- export { AsaraBTevetEvent, CandleLightingEvent, DafYomi, DafYomiEvent, Event, HDate, HavdalahEvent, HebrewCalendar, HebrewDateEvent, HolidayEvent, Locale, Location, MevarchimChodeshEvent, MishnaYomiEvent, MishnaYomiIndex, Molad, MoladEvent, NachYomiEvent, NachYomiIndex, OmerEvent, ParshaEvent, RoshChodeshEvent, RoshHashanaEvent, Sedra, TimedEvent, YerushalmiYomiEvent, Zmanim, flags, gematriya$1 as gematriya, greg, months, parshiot, schottenstein, version, vilna, yerushalmiYomi };
6762
+ export { AsaraBTevetEvent, CandleLightingEvent, DafYomi, DafYomiEvent, Event, HDate, HavdalahEvent, HebrewCalendar, HebrewDateEvent, HolidayEvent, Locale, Location, MevarchimChodeshEvent, MishnaYomiEvent, MishnaYomiIndex, Molad, MoladEvent, NachYomiEvent, NachYomiIndex, OmerEvent, ParshaEvent, RoshChodeshEvent, RoshHashanaEvent, Sedra, TimedEvent, YerushalmiYomiEvent, Zmanim, flags, gematriya, greg, months, parshiot, schottenstein, version, vilna, yerushalmiYomi };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "3.48.2",
3
+ "version": "3.48.4",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",