@hebcal/core 4.0.1 → 4.0.3
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/bundle.js +29 -20
- package/dist/bundle.min.js +2 -2
- package/dist/greg0.mjs +1 -1
- package/dist/hdate-bundle.js +3 -2
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +3 -2
- package/dist/hdate.mjs +3 -2
- package/dist/hdate0-bundle.js +1 -1
- package/dist/hdate0-bundle.min.js +1 -1
- package/dist/hdate0.mjs +1 -1
- package/dist/index.js +28 -2
- package/dist/index.mjs +28 -2
- package/hebcal.d.ts +5 -1
- package/package.json +7 -7
- package/po/a.txt +576 -0
- package/po/b.txt +264 -0
package/dist/greg0.mjs
CHANGED
package/dist/hdate-bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -343,6 +343,7 @@ function abs2greg(abs) {
|
|
|
343
343
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
344
344
|
*/
|
|
345
345
|
|
|
346
|
+
|
|
346
347
|
/**
|
|
347
348
|
* Gregorian date helper functions.
|
|
348
349
|
*/
|
|
@@ -1889,7 +1890,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
1889
1890
|
return new HDate(day, month, hyear);
|
|
1890
1891
|
}
|
|
1891
1892
|
|
|
1892
|
-
var version="4.0.
|
|
1893
|
+
var version="4.0.3";
|
|
1893
1894
|
|
|
1894
1895
|
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};
|
|
1895
1896
|
|
package/dist/hdate-bundle.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
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 s=r(n%1e3);if(1==s.length)return a+t(s[0])+"׳";for(var c=0;c<s.length;c++)c+1===s.length&&(a+="״"),a+=t(s[c]);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,(a=n.key,o=void 0,"symbol"==typeof(o=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)}(a,"string"))?o:String(o)),n)}var a,o}function i(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var s=[0,31,28,31,30,31,30,31,31,30,31,30,31],c=[s,s.slice()];function h(e,t){return e-t*Math.floor(e/t)}function l(e,t){return Math.floor(e/t)}function f(e){return!(e%4||!(e%100)&&e%400)}function y(e){return"object"===a(e)&&Date.prototype===e.__proto__}function v(e){if(!y(e))throw new TypeError("Argument not a Date: ".concat(e));return d(e.getFullYear(),e.getMonth()+1,e.getDate())}function d(e,t,r){var n=e-1;return 365*n+l(n,4)-l(n,100)+l(n,400)+l(367*t-362,12)+(t<=2?0:f(e)?-1:-2)+r}function m(e){if("number"!=typeof e)throw new TypeError("Argument not a Number: ".concat(e));var t=function(e){var t=e-1,r=l(t,146097),n=h(t,146097),a=l(n,36524),o=h(n,36524),u=l(o,1461),i=l(h(o,1461),365),s=400*r+100*a+4*u+i;return 4!=a&&4!=i?s+1:s}(e=Math.trunc(e)),r=l(12*(e-d(t,1,1)+(e<d(t,3,1)?0:f(t)?1:2))+373,367),n=e-d(t,r,1)+1,a=new Date(t,r-1,n);return t<100&&t>=0&&a.setFullYear(t),a}c[1][2]=29;var g={monthNames:["","January","February","March","April","May","June","July","August","September","October","November","December"],isLeapYear:f,daysInMonth:function(e,t){return c[+f(t)][e]},isDate:y,dayOfYear:function(e){if(!y(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),f(e.getFullYear())&&r++),r},greg2abs:v,abs2greg:m},b={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},w={h:"he",a:"ashkenazi",s:"en","":"en"},p=Object.create(null),k=null,A=null,I=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&&p[r]||k)[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"));p[e.toLowerCase()]=t.contexts[""]}},{key:"useLocale",value:function(e){var t=e.toLowerCase(),r=p[t];if(!r)throw new RangeError("Locale '".concat(e,"' not found"));return A=w[t]||t,k=r}},{key:"getLocaleName",value:function(){return A}},{key:"getLocaleNames",value:function(){return Object.keys(p).sort()}},{key:"ordinal",value:function(e,t){var r=t&&t.toLowerCase()||A;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}();I.addLocale("en",b),I.addLocale("s",b),I.addLocale("",b),I.useLocale("en");var N=1,E=2,T=4,D=6,M=7,S=8,L=9,Y=10,H=12,R=13,V={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},O=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],F=[O.concat(["Adar","Nisan"]),O.concat(["Adar I","Adar II","Nisan"])],_=Object.create(null),C=-1373428,x=365.24682220597794;function j(e,t){if("number"!=typeof e||isNaN(e))throw new TypeError("invalid parameter '".concat(t,"' not a number: ").concat(e))}function z(e,t,r){if(j(e,"year"),j(t,"month"),j(r,"day"),e<1)throw new RangeError("hebrew2abs: invalid year ".concat(e));var n=r;if(t<M){for(var a=M;a<=P(e);a++)n+=J(a,e);for(var o=N;o<t;o++)n+=J(o,e)}else for(var u=M;u<t;u++)n+=J(u,e);return C+$(e)+n-1}function U(e){return C+$(e)}function K(e){if(j(e,"abs"),(e=Math.trunc(e))<=C)throw new RangeError("abs2hebrew: ".concat(e," is before epoch"));for(var t=Math.floor((e-C)/x);U(t)<=e;)++t;for(var r=e<z(--t,1,1)?7:1;e>z(t,r,J(r,t));)++r;return{yy:t,mm:r,dd:1+e-z(t,r,1)}}function B(e){return(1+7*e)%19<7}function P(e){return 12+B(e)}function J(e,t){switch(e){case E:case T:case D:case Y:case R:return 29}return e===H&&!B(t)||e===S&&!G(t)||e===L&&Q(t)?29:30}function Z(e,t){if(j(e,"month"),j(t,"year"),e<1||e>14)throw new TypeError("bad month argument ".concat(e));return F[+B(t)][e]}function $(e){var t=_[e]=_[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&&!B(e)||1==u%7&&o>=16789&&B(t));return i+(i%7==0||i%7==3||i%7==5)}(e);return t}function q(e){return $(e+1)-$(e)}function G(e){return q(e)%10==5}function Q(e){return q(e)%10==3}function W(e){throw new TypeError(e)}var X="day",ee="week",te="month",re="year",ne={d:X,w:ee,M:te,y:re},ae={day:X,week:ee,month:te,year:re},oe=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)?y(t)?v(t):e.isHDate(t)?{dd:t.day,mm:t.month,yy:t.year}:W("HDate called with bad argument: ".concat(t)):t,u="number"==typeof a,i=u?K(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 B(this.year)}},{key:"getMonth",value:function(){return this.month}},{key:"getTishreiMonth",value:function(){var e=P(this.getFullYear());return(this.getMonth()+e-6)%e||e}},{key:"daysInMonth",value:function(){return J(this.getMonth(),this.getFullYear())}},{key:"getDate",value:function(){return this.day}},{key:"getDay",value:function(){return h(this.abs(),7)}},{key:"setFullYear",value:function(e){return this.year=e,ue(this),this}},{key:"setMonth",value:function(t){return this.month=e.monthNum(t),ue(this),this}},{key:"setDate",value:function(e){return this.day=e,ue(this),this}},{key:"greg",value:function(){return m(this.abs())}},{key:"abs",value:function(){return"number"!=typeof this.abs0&&(this.abs0=z(this.year,this.month,this.day)),this.abs0}},{key:"getMonthName",value:function(){return Z(this.getMonth(),this.getFullYear())}},{key:"render",value:function(){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||I.getLocaleName(),n=this.getDate(),a=I.gettext(this.getMonthName(),r),o=I.ordinal(n,r),u=e.getDayOfTranslation(r),i="".concat(o).concat(u," ").concat(a);if(t){var s=this.getFullYear();return"".concat(i,", ").concat(s)}return i}},{key:"renderGematriya",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getDate(),r=e?"he-x-NoNikud":"he",a=I.gettext(this.getMonthName(),r),o=this.getFullYear();return n(t)+" "+a+" "+n(o)}},{key:"before",value:function(e){return se(e,this,-1)}},{key:"onOrBefore",value:function(e){return se(e,this,0)}},{key:"nearest",value:function(e){return se(e,this,3)}},{key:"onOrAfter",value:function(e){return se(e,this,6)}},{key:"after",value:function(e){return se(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===ee)return new e(this.abs()+7*t);if(r===re)return new e(this.getDate(),this.getMonth(),this.getFullYear()+t);if(r===te){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 z(e,t,r)}},{key:"abs2hebrew",value:function(e){return K(e)}},{key:"getDayOfTranslation",value:function(e){switch(e){case"en":case"s":case"a":case"ashkenazi":return" of"}var t=I.lookupTranslation("of",e);return t?" "+t:"ashkenazi"===e.substring(0,9)?" of":""}},{key:"standardizeUnits",value:function(e){var t=ne[e]||String(e||"").toLowerCase().replace(/s$/,"");return ae[t]||W("Invalid units '".concat(e,"'"))}},{key:"isLeapYear",value:function(e){return B(e)}},{key:"monthsInYear",value:function(e){return P(e)}},{key:"daysInMonth",value:function(e,t){return J(e,t)}},{key:"getMonthName",value:function(e,t){return Z(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 q(e)}},{key:"longCheshvan",value:function(e){return G(e)}},{key:"shortKislev",value:function(e){return Q(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 V.NISAN;case"i":return V.IYYAR;case"e":return V.ELUL;case"c":case"ח":return V.CHESHVAN;case"k":case"כ":return V.KISLEV;case"s":switch(t[1]){case"i":return V.SIVAN;case"h":return V.SHVAT}case"t":switch(t[1]){case"a":return V.TAMUZ;case"i":return V.TISHREI;case"e":return V.TEVET}break;case"a":switch(t[1]){case"v":return V.AV;case"d":return/(1|[^i]i|a|א)$/i.test(e)?V.ADAR_I:V.ADAR_II}break;case"ס":return V.SIVAN;case"ט":return V.TEVET;case"ש":return V.SHVAT;case"א":switch(t[1]){case"ב":return V.AV;case"ד":return/(1|[^i]i|a|א)$/i.test(e)?V.ADAR_I:V.ADAR_II;case"י":return V.IYYAR;case"ל":return V.ELUL}break;case"ת":switch(t[1]){case"מ":return V.TAMUZ;case"ש":return V.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 ue(e){ie(e),function(e){e.day<1&&(e.month==V.TISHREI&&(e.year-=1),e.day+=J(e.month,e.year),e.month-=1,ue(e));e.day>J(e.month,e.year)&&(e.month===V.ELUL&&(e.year+=1),e.day-=J(e.month,e.year),e.month+=1,ue(e));ie(e)}(e)}function ie(e){e.month!==V.ADAR_II||e.isLeapYear()?e.month<1?(e.month+=P(e.year),e.year-=1,ue(e)):e.month>P(e.year)&&(e.month-=P(e.year),e.year+=1,ue(e)):(e.month-=1,ue(e)),delete e.abs0}function se(e,t,r){return new oe(oe.dayOnOrBefore(e,t.abs()+r))}var ce=V.NISAN,he=V.CHESHVAN,le=V.KISLEV,fe=V.TEVET,ye=V.SHVAT,ve=V.ADAR_I,de=V.ADAR_II;var me={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:["תִשְׁרֵי"]}}};I.addLocale("he",me),I.addLocale("h",me);var ge=me.contexts[""],be={};return Object.keys(ge).forEach((function(e){be[e]=[I.hebrewStripNikkud(ge[e][0])]})),I.addLocale("he-x-NoNikud",{headers:me.headers,contexts:{"":be}}),e.HDate=oe,e.Locale=I,e.gematriya=n,e.getBirthdayOrAnniversary=function(e,t){var r=oe.isHDate(t)?t:new oe(t),n=r.getFullYear();if(e===n)return r;if(!(e<n)){var a=B(n),o=r.getMonth(),u=r.getDate();return o==ve&&!a||o==de&&a?o=P(e):o!=he||30!=u||G(e)?o==le&&30==u&&Q(e)?(o=fe,u=1):o==ve&&30==u&&a&&!B(e)&&(o=ce,u=1):(o=le,u=1),new oe(u,o,e)}},e.getYahrzeit=function(e,t){var r=oe.isHDate(t)?t:new oe(t),n={yy:r.getFullYear(),mm:r.getMonth(),dd:r.getDate()};if(!(e<=n.yy))return n.mm!=he||30!=n.dd||G(n.yy+1)?n.mm==le&&30==n.dd&&Q(n.yy+1)?n=K(z(e,fe,1)-1):n.mm==de?n.mm=P(e):n.mm!=ve||30!=n.dd||B(e)||(n.dd=30,n.mm=ye):n=K(z(e,le,1)-1),n.mm!=he||30!=n.dd||G(e)?n.mm==le&&30==n.dd&&Q(e)&&(n.mm=fe,n.dd=1):(n.mm=le,n.dd=1),new oe(n.dd,n.mm,e)},e.greg=g,e.months=V,e.version="4.0.1",e}({});
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
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 s=r(n%1e3);if(1==s.length)return a+t(s[0])+"׳";for(var c=0;c<s.length;c++)c+1===s.length&&(a+="״"),a+=t(s[c]);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,(a=n.key,o=void 0,"symbol"==typeof(o=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)}(a,"string"))?o:String(o)),n)}var a,o}function i(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var s=[0,31,28,31,30,31,30,31,31,30,31,30,31],c=[s,s.slice()];function h(e,t){return e-t*Math.floor(e/t)}function l(e,t){return Math.floor(e/t)}function f(e){return!(e%4||!(e%100)&&e%400)}function y(e){return"object"===a(e)&&Date.prototype===e.__proto__}function v(e){if(!y(e))throw new TypeError("Argument not a Date: ".concat(e));return d(e.getFullYear(),e.getMonth()+1,e.getDate())}function d(e,t,r){var n=e-1;return 365*n+l(n,4)-l(n,100)+l(n,400)+l(367*t-362,12)+(t<=2?0:f(e)?-1:-2)+r}function m(e){if("number"!=typeof e)throw new TypeError("Argument not a Number: ".concat(e));var t=function(e){var t=e-1,r=l(t,146097),n=h(t,146097),a=l(n,36524),o=h(n,36524),u=l(o,1461),i=l(h(o,1461),365),s=400*r+100*a+4*u+i;return 4!=a&&4!=i?s+1:s}(e=Math.trunc(e)),r=l(12*(e-d(t,1,1)+(e<d(t,3,1)?0:f(t)?1:2))+373,367),n=e-d(t,r,1)+1,a=new Date(t,r-1,n);return t<100&&t>=0&&a.setFullYear(t),a}c[1][2]=29;var g={monthNames:["","January","February","March","April","May","June","July","August","September","October","November","December"],isLeapYear:f,daysInMonth:function(e,t){return c[+f(t)][e]},isDate:y,dayOfYear:function(e){if(!y(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),f(e.getFullYear())&&r++),r},greg2abs:v,abs2greg:m},b={headers:{"plural-forms":"nplurals=2; plural=(n!=1);"},contexts:{"":{}}},w={h:"he",a:"ashkenazi",s:"en","":"en"},p=Object.create(null),k=null,A=null,I=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&&p[r]||k)[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"));p[e.toLowerCase()]=t.contexts[""]}},{key:"useLocale",value:function(e){var t=e.toLowerCase(),r=p[t];if(!r)throw new RangeError("Locale '".concat(e,"' not found"));return A=w[t]||t,k=r}},{key:"getLocaleName",value:function(){return A}},{key:"getLocaleNames",value:function(){return Object.keys(p).sort()}},{key:"ordinal",value:function(e,t){var r=t&&t.toLowerCase()||A;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}();I.addLocale("en",b),I.addLocale("s",b),I.addLocale("",b),I.useLocale("en");var N=1,E=2,T=4,D=6,M=7,S=8,L=9,Y=10,H=12,R=13,V={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},O=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],F=[O.concat(["Adar","Nisan"]),O.concat(["Adar I","Adar II","Nisan"])],_=Object.create(null),C=-1373428,x=365.24682220597794;function j(e,t){if("number"!=typeof e||isNaN(e))throw new TypeError("invalid parameter '".concat(t,"' not a number: ").concat(e))}function z(e,t,r){if(j(e,"year"),j(t,"month"),j(r,"day"),e<1)throw new RangeError("hebrew2abs: invalid year ".concat(e));var n=r;if(t<M){for(var a=M;a<=P(e);a++)n+=J(a,e);for(var o=N;o<t;o++)n+=J(o,e)}else for(var u=M;u<t;u++)n+=J(u,e);return C+$(e)+n-1}function U(e){return C+$(e)}function K(e){if(j(e,"abs"),(e=Math.trunc(e))<=C)throw new RangeError("abs2hebrew: ".concat(e," is before epoch"));for(var t=Math.floor((e-C)/x);U(t)<=e;)++t;for(var r=e<z(--t,1,1)?7:1;e>z(t,r,J(r,t));)++r;return{yy:t,mm:r,dd:1+e-z(t,r,1)}}function B(e){return(1+7*e)%19<7}function P(e){return 12+B(e)}function J(e,t){switch(e){case E:case T:case D:case Y:case R:return 29}return e===H&&!B(t)||e===S&&!G(t)||e===L&&Q(t)?29:30}function Z(e,t){if(j(e,"month"),j(t,"year"),e<1||e>14)throw new TypeError("bad month argument ".concat(e));return F[+B(t)][e]}function $(e){var t=_[e]=_[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&&!B(e)||1==u%7&&o>=16789&&B(t));return i+(i%7==0||i%7==3||i%7==5)}(e);return t}function q(e){return $(e+1)-$(e)}function G(e){return q(e)%10==5}function Q(e){return q(e)%10==3}function W(e){throw new TypeError(e)}var X="day",ee="week",te="month",re="year",ne={d:X,w:ee,M:te,y:re},ae={day:X,week:ee,month:te,year:re},oe=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)?y(t)?v(t):e.isHDate(t)?{dd:t.day,mm:t.month,yy:t.year}:W("HDate called with bad argument: ".concat(t)):t,u="number"==typeof a,i=u?K(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 B(this.year)}},{key:"getMonth",value:function(){return this.month}},{key:"getTishreiMonth",value:function(){var e=P(this.getFullYear());return(this.getMonth()+e-6)%e||e}},{key:"daysInMonth",value:function(){return J(this.getMonth(),this.getFullYear())}},{key:"getDate",value:function(){return this.day}},{key:"getDay",value:function(){return h(this.abs(),7)}},{key:"setFullYear",value:function(e){return this.year=e,ue(this),this}},{key:"setMonth",value:function(t){return this.month=e.monthNum(t),ue(this),this}},{key:"setDate",value:function(e){return this.day=e,ue(this),this}},{key:"greg",value:function(){return m(this.abs())}},{key:"abs",value:function(){return"number"!=typeof this.abs0&&(this.abs0=z(this.year,this.month,this.day)),this.abs0}},{key:"getMonthName",value:function(){return Z(this.getMonth(),this.getFullYear())}},{key:"render",value:function(){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||I.getLocaleName(),n=this.getDate(),a=I.gettext(this.getMonthName(),r),o=I.ordinal(n,r),u=e.getDayOfTranslation(r),i="".concat(o).concat(u," ").concat(a);if(t){var s=this.getFullYear();return"".concat(i,", ").concat(s)}return i}},{key:"renderGematriya",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getDate(),r=e?"he-x-NoNikud":"he",a=I.gettext(this.getMonthName(),r),o=this.getFullYear();return n(t)+" "+a+" "+n(o)}},{key:"before",value:function(e){return se(e,this,-1)}},{key:"onOrBefore",value:function(e){return se(e,this,0)}},{key:"nearest",value:function(e){return se(e,this,3)}},{key:"onOrAfter",value:function(e){return se(e,this,6)}},{key:"after",value:function(e){return se(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===ee)return new e(this.abs()+7*t);if(r===re)return new e(this.getDate(),this.getMonth(),this.getFullYear()+t);if(r===te){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 z(e,t,r)}},{key:"abs2hebrew",value:function(e){return K(e)}},{key:"getDayOfTranslation",value:function(e){switch(e){case"en":case"s":case"a":case"ashkenazi":return" of"}var t=I.lookupTranslation("of",e);return t?" "+t:"ashkenazi"===e.substring(0,9)?" of":""}},{key:"standardizeUnits",value:function(e){var t=ne[e]||String(e||"").toLowerCase().replace(/s$/,"");return ae[t]||W("Invalid units '".concat(e,"'"))}},{key:"isLeapYear",value:function(e){return B(e)}},{key:"monthsInYear",value:function(e){return P(e)}},{key:"daysInMonth",value:function(e,t){return J(e,t)}},{key:"getMonthName",value:function(e,t){return Z(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 q(e)}},{key:"longCheshvan",value:function(e){return G(e)}},{key:"shortKislev",value:function(e){return Q(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 V.NISAN;case"i":return V.IYYAR;case"e":return V.ELUL;case"c":case"ח":return V.CHESHVAN;case"k":case"כ":return V.KISLEV;case"s":switch(t[1]){case"i":return V.SIVAN;case"h":return V.SHVAT}case"t":switch(t[1]){case"a":return V.TAMUZ;case"i":return V.TISHREI;case"e":return V.TEVET}break;case"a":switch(t[1]){case"v":return V.AV;case"d":return/(1|[^i]i|a|א)$/i.test(e)?V.ADAR_I:V.ADAR_II}break;case"ס":return V.SIVAN;case"ט":return V.TEVET;case"ש":return V.SHVAT;case"א":switch(t[1]){case"ב":return V.AV;case"ד":return/(1|[^i]i|a|א)$/i.test(e)?V.ADAR_I:V.ADAR_II;case"י":return V.IYYAR;case"ל":return V.ELUL}break;case"ת":switch(t[1]){case"מ":return V.TAMUZ;case"ש":return V.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 ue(e){ie(e),function(e){e.day<1&&(e.month==V.TISHREI&&(e.year-=1),e.day+=J(e.month,e.year),e.month-=1,ue(e));e.day>J(e.month,e.year)&&(e.month===V.ELUL&&(e.year+=1),e.day-=J(e.month,e.year),e.month+=1,ue(e));ie(e)}(e)}function ie(e){e.month!==V.ADAR_II||e.isLeapYear()?e.month<1?(e.month+=P(e.year),e.year-=1,ue(e)):e.month>P(e.year)&&(e.month-=P(e.year),e.year+=1,ue(e)):(e.month-=1,ue(e)),delete e.abs0}function se(e,t,r){return new oe(oe.dayOnOrBefore(e,t.abs()+r))}var ce=V.NISAN,he=V.CHESHVAN,le=V.KISLEV,fe=V.TEVET,ye=V.SHVAT,ve=V.ADAR_I,de=V.ADAR_II;var me={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:["תִשְׁרֵי"]}}};I.addLocale("he",me),I.addLocale("h",me);var ge=me.contexts[""],be={};return Object.keys(ge).forEach((function(e){be[e]=[I.hebrewStripNikkud(ge[e][0])]})),I.addLocale("he-x-NoNikud",{headers:me.headers,contexts:{"":be}}),e.HDate=oe,e.Locale=I,e.gematriya=n,e.getBirthdayOrAnniversary=function(e,t){var r=oe.isHDate(t)?t:new oe(t),n=r.getFullYear();if(e===n)return r;if(!(e<n)){var a=B(n),o=r.getMonth(),u=r.getDate();return o==ve&&!a||o==de&&a?o=P(e):o!=he||30!=u||G(e)?o==le&&30==u&&Q(e)?(o=fe,u=1):o==ve&&30==u&&a&&!B(e)&&(o=ce,u=1):(o=le,u=1),new oe(u,o,e)}},e.getYahrzeit=function(e,t){var r=oe.isHDate(t)?t:new oe(t),n={yy:r.getFullYear(),mm:r.getMonth(),dd:r.getDate()};if(!(e<=n.yy))return n.mm!=he||30!=n.dd||G(n.yy+1)?n.mm==le&&30==n.dd&&Q(n.yy+1)?n=K(z(e,fe,1)-1):n.mm==de?n.mm=P(e):n.mm!=ve||30!=n.dd||B(e)||(n.dd=30,n.mm=ye):n=K(z(e,le,1)-1),n.mm!=he||30!=n.dd||G(e)?n.mm==le&&30==n.dd&&Q(e)&&(n.mm=fe,n.dd=1):(n.mm=le,n.dd=1),new oe(n.dd,n.mm,e)},e.greg=g,e.months=V,e.version="4.0.3",e}({});
|
package/dist/hdate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const GERESH = '׳';
|
|
@@ -296,6 +296,7 @@ function abs2greg(abs) {
|
|
|
296
296
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
297
297
|
*/
|
|
298
298
|
|
|
299
|
+
|
|
299
300
|
/**
|
|
300
301
|
* Gregorian date helper functions.
|
|
301
302
|
*/
|
|
@@ -1746,7 +1747,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
1746
1747
|
return new HDate(day, month, hyear);
|
|
1747
1748
|
}
|
|
1748
1749
|
|
|
1749
|
-
const version="4.0.
|
|
1750
|
+
const version="4.0.3";
|
|
1750
1751
|
|
|
1751
1752
|
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};
|
|
1752
1753
|
|
package/dist/hdate.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
const GERESH = '׳';
|
|
3
3
|
const GERSHAYIM = '״';
|
|
4
4
|
|
|
@@ -280,6 +280,7 @@ function abs2greg(abs) {
|
|
|
280
280
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
281
281
|
*/
|
|
282
282
|
|
|
283
|
+
|
|
283
284
|
/**
|
|
284
285
|
* Gregorian date helper functions.
|
|
285
286
|
*/
|
|
@@ -1784,7 +1785,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
1784
1785
|
return new HDate(day, month, hyear);
|
|
1785
1786
|
}
|
|
1786
1787
|
|
|
1787
|
-
const version="4.0.
|
|
1788
|
+
const version="4.0.3";
|
|
1788
1789
|
|
|
1789
1790
|
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};
|
|
1790
1791
|
|
package/dist/hdate0-bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
var hebcal=function(r){"use strict";function n(r){return n="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},n(r)}var t=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e(r,n){return r-n*Math.floor(r/n)}function o(r,n){return Math.floor(r/n)}function a(r){return!(r%4||!(r%100)&&r%400)}function u(r,n,t){var e=r-1;return 365*e+o(e,4)-o(e,100)+o(e,400)+o(367*n-362,12)+(n<=2?0:a(r)?-1:-2)+t}[t,t.slice()][1][2]=29;var c=1,f=2,i=4,h=6,s=7,l=8,y=9,b=10,v=12,m=13,p=["","Nisan","Iyyar","Sivan","Tamuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Sh'vat"],w=[p.concat(["Adar","Nisan"]),p.concat(["Adar I","Adar II","Nisan"])],A=Object.create(null),I=-1373428;function g(r,n){if("number"!=typeof r||isNaN(r))throw new TypeError("invalid parameter '".concat(n,"' not a number: ").concat(r))}function M(r,n,t){if(g(r,"year"),g(n,"month"),g(t,"day"),r<1)throw new RangeError("hebrew2abs: invalid year ".concat(r));var e=t;if(n<s){for(var o=s;o<=d(r);o++)e+=T(o,r);for(var a=c;a<n;a++)e+=T(a,r)}else for(var u=s;u<n;u++)e+=T(u,r);return I+N(r)+e-1}function E(r){return I+N(r)}function S(r){return(1+7*r)%19<7}function d(r){return 12+S(r)}function T(r,n){switch(r){case f:case i:case h:case b:case m:return 29}return r===v&&!S(n)||r===l&&!D(n)||r===y&&R(n)?29:30}function N(r){var n=A[r]=A[r]||function(r){var n=r-1,t=235*Math.floor(n/19)+n%19*12+Math.floor((n%19*7+1)/19),e=204+t%1080*793,o=5+12*t+793*Math.floor(t/1080)+Math.floor(e/1080),a=e%1080+o%24*1080,u=1+29*t+Math.floor(o/24),c=u+(a>=19440||2==u%7&&a>=9924&&!S(r)||1==u%7&&a>=16789&&S(n));return c+(c%7==0||c%7==3||c%7==5)}(r);return n}function Y(r){return N(r+1)-N(r)}function D(r){return Y(r)%10==5}function R(r){return Y(r)%10==3}var V={abs2hebrew:function(r){if(g(r,"abs"),(r=Math.trunc(r))<=I)throw new RangeError("abs2hebrew: ".concat(r," is before epoch"));for(var n=Math.floor((r-I)/365.24682220597794);E(n)<=r;)++n;for(var t=r<M(--n,1,1)?7:1;r>M(n,t,T(t,n));)++t;return{yy:n,mm:t,dd:1+r-M(n,t,1)}},daysInMonth:T,daysInYear:Y,getMonthName:function(r,n){if(g(r,"month"),g(n,"year"),r<1||r>14)throw new TypeError("bad month argument ".concat(r));return w[+S(n)][r]},hebrew2abs:M,isLeapYear:S,longCheshvan:D,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:d,shortKislev:R};return r.abs2greg=function(r){if("number"!=typeof r)throw new TypeError("Argument not a Number: ".concat(r));var n=function(r){var n=r-1,t=o(n,146097),a=e(n,146097),u=o(a,36524),c=e(a,36524),f=o(c,1461),i=o(e(c,1461),365),h=400*t+100*u+4*f+i;return 4!=u&&4!=i?h+1:h}(r=Math.trunc(r)),t=o(12*(r-u(n,1,1)+(r<u(n,3,1)?0:a(n)?1:2))+373,367),c=r-u(n,t,1)+1,f=new Date(n,t-1,c);return n<100&&n>=0&&f.setFullYear(n),f},r.greg2abs=function(r){if("object"!==n(t=r)||Date.prototype!==t.__proto__)throw new TypeError("Argument not a Date: ".concat(r));var t;return u(r.getFullYear(),r.getMonth()+1,r.getDate())},r.hdate=V,r}({});
|
package/dist/hdate0.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -170,6 +170,7 @@ function abs2greg(abs) {
|
|
|
170
170
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
171
171
|
*/
|
|
172
172
|
|
|
173
|
+
|
|
173
174
|
/**
|
|
174
175
|
* Gregorian date helper functions.
|
|
175
176
|
*/
|
|
@@ -2746,6 +2747,7 @@ class Zmanim {
|
|
|
2746
2747
|
You should have received a copy of the GNU General Public License
|
|
2747
2748
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
2748
2749
|
*/
|
|
2750
|
+
|
|
2749
2751
|
const classicCities0 = [['Ashdod', 'IL', 31.79213, 34.64966, 'Asia/Jerusalem'], ['Atlanta', 'US', 33.749, -84.38798, 'America/New_York'], ['Austin', 'US', 30.26715, -97.74306, 'America/Chicago'], ['Baghdad', 'IQ', 33.34058, 44.40088, 'Asia/Baghdad'], ['Beer Sheva', 'IL', 31.25181, 34.7913, 'Asia/Jerusalem'], ['Berlin', 'DE', 52.52437, 13.41053, 'Europe/Berlin'], ['Baltimore', 'US', 39.29038, -76.61219, 'America/New_York'], ['Bogota', 'CO', 4.60971, -74.08175, 'America/Bogota'], ['Boston', 'US', 42.35843, -71.05977, 'America/New_York'], ['Budapest', 'HU', 47.49801, 19.03991, 'Europe/Budapest'], ['Buenos Aires', 'AR', -34.61315, -58.37723, 'America/Argentina/Buenos_Aires'], ['Buffalo', 'US', 42.88645, -78.87837, 'America/New_York'], ['Chicago', 'US', 41.85003, -87.65005, 'America/Chicago'], ['Cincinnati', 'US', 39.162, -84.45689, 'America/New_York'], ['Cleveland', 'US', 41.4995, -81.69541, 'America/New_York'], ['Dallas', 'US', 32.78306, -96.80667, 'America/Chicago'], ['Denver', 'US', 39.73915, -104.9847, 'America/Denver'], ['Detroit', 'US', 42.33143, -83.04575, 'America/Detroit'], ['Eilat', 'IL', 29.55805, 34.94821, 'Asia/Jerusalem'], ['Gibraltar', 'GI', 36.14474, -5.35257, 'Europe/Gibraltar'], ['Haifa', 'IL', 32.81841, 34.9885, 'Asia/Jerusalem'], ['Hawaii', 'US', 21.30694, -157.85833, 'Pacific/Honolulu'], ['Helsinki', 'FI', 60.16952, 24.93545, 'Europe/Helsinki'], ['Houston', 'US', 29.76328, -95.36327, 'America/Chicago'], ['Jerusalem', 'IL', 31.76904, 35.21633, 'Asia/Jerusalem'], ['Johannesburg', 'ZA', -26.20227, 28.04363, 'Africa/Johannesburg'], ['Kiev', 'UA', 50.45466, 30.5238, 'Europe/Kiev'], ['La Paz', 'BO', -16.5, -68.15, 'America/La_Paz'], ['Livingston', 'US', 40.79593, -74.31487, 'America/New_York'], ['Las Vegas', 'US', 36.17497, -115.13722, 'America/Los_Angeles'], ['London', 'GB', 51.50853, -0.12574, 'Europe/London'], ['Los Angeles', 'US', 34.05223, -118.24368, 'America/Los_Angeles'], ['Marseilles', 'FR', 43.29695, 5.38107, 'Europe/Paris'], ['Miami', 'US', 25.77427, -80.19366, 'America/New_York'], ['Minneapolis', 'US', 44.97997, -93.26384, 'America/Chicago'], ['Melbourne', 'AU', -37.814, 144.96332, 'Australia/Melbourne'], ['Mexico City', 'MX', 19.42847, -99.12766, 'America/Mexico_City'], ['Montreal', 'CA', 45.50884, -73.58781, 'America/Toronto'], ['Moscow', 'RU', 55.75222, 37.61556, 'Europe/Moscow'], ['New York', 'US', 40.71427, -74.00597, 'America/New_York'], ['Omaha', 'US', 41.25861, -95.93779, 'America/Chicago'], ['Ottawa', 'CA', 45.41117, -75.69812, 'America/Toronto'], ['Panama City', 'PA', 8.9936, -79.51973, 'America/Panama'], ['Paris', 'FR', 48.85341, 2.3488, 'Europe/Paris'], ['Pawtucket', 'US', 41.87871, -71.38256, 'America/New_York'], ['Petach Tikvah', 'IL', 32.08707, 34.88747, 'Asia/Jerusalem'], ['Philadelphia', 'US', 39.95233, -75.16379, 'America/New_York'], ['Phoenix', 'US', 33.44838, -112.07404, 'America/Phoenix'], ['Pittsburgh', 'US', 40.44062, -79.99589, 'America/New_York'], ['Providence', 'US', 41.82399, -71.41283, 'America/New_York'], ['Portland', 'US', 45.52345, -122.67621, 'America/Los_Angeles'], ['Saint Louis', 'US', 38.62727, -90.19789, 'America/Chicago'], ['Saint Petersburg', 'RU', 59.93863, 30.31413, 'Europe/Moscow'], ['San Diego', 'US', 32.71533, -117.15726, 'America/Los_Angeles'], ['San Francisco', 'US', 37.77493, -122.41942, 'America/Los_Angeles'], ['Sao Paulo', 'BR', -23.5475, -46.63611, 'America/Sao_Paulo'], ['Seattle', 'US', 47.60621, -122.33207, 'America/Los_Angeles'], ['Sydney', 'AU', -33.86785, 151.20732, 'Australia/Sydney'], ['Tel Aviv', 'IL', 32.08088, 34.78057, 'Asia/Jerusalem'], ['Tiberias', 'IL', 32.79221, 35.53124, 'Asia/Jerusalem'], ['Toronto', 'CA', 43.70011, -79.4163, 'America/Toronto'], ['Vancouver', 'CA', 49.24966, -123.11934, 'America/Vancouver'], ['White Plains', 'US', 41.03399, -73.76291, 'America/New_York'], ['Washington DC', 'US', 38.89511, -77.03637, 'America/New_York'], ['Worcester', 'US', 42.26259, -71.80229, 'America/New_York']];
|
|
2750
2752
|
const classicCities = Object.create(null);
|
|
2751
2753
|
|
|
@@ -3572,6 +3574,27 @@ function getTodayIsHe(omer) {
|
|
|
3572
3574
|
}
|
|
3573
3575
|
|
|
3574
3576
|
/* eslint-disable new-cap */
|
|
3577
|
+
/*
|
|
3578
|
+
Hebcal - A Jewish Calendar Generator
|
|
3579
|
+
Copyright (c) 1994-2020 Danny Sadinoff
|
|
3580
|
+
Portions copyright Eyal Schachter and Michael J. Radwin
|
|
3581
|
+
|
|
3582
|
+
https://github.com/hebcal/hebcal-es6
|
|
3583
|
+
|
|
3584
|
+
This program is free software; you can redistribute it and/or
|
|
3585
|
+
modify it under the terms of the GNU General Public License
|
|
3586
|
+
as published by the Free Software Foundation; either version 2
|
|
3587
|
+
of the License, or (at your option) any later version.
|
|
3588
|
+
|
|
3589
|
+
This program is distributed in the hope that it will be useful,
|
|
3590
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
3591
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
3592
|
+
GNU General Public License for more details.
|
|
3593
|
+
|
|
3594
|
+
You should have received a copy of the GNU General Public License
|
|
3595
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
3596
|
+
*/
|
|
3597
|
+
|
|
3575
3598
|
const INCOMPLETE = 0;
|
|
3576
3599
|
const REGULAR = 1;
|
|
3577
3600
|
const COMPLETE = 2;
|
|
@@ -4534,6 +4557,9 @@ class HolidayEvent extends Event {
|
|
|
4534
4557
|
}
|
|
4535
4558
|
/** @return {string[]} */
|
|
4536
4559
|
getCategories() {
|
|
4560
|
+
if (this.cholHaMoedDay) {
|
|
4561
|
+
return ['holiday', 'major', 'cholhamoed'];
|
|
4562
|
+
}
|
|
4537
4563
|
const cats = super.getCategories();
|
|
4538
4564
|
if (cats[0] !== 'unknown') {
|
|
4539
4565
|
return cats;
|
|
@@ -5136,7 +5162,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
5136
5162
|
return new HDate(day, month, hyear);
|
|
5137
5163
|
}
|
|
5138
5164
|
|
|
5139
|
-
var version="4.0.
|
|
5165
|
+
var version="4.0.3";
|
|
5140
5166
|
|
|
5141
5167
|
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};
|
|
5142
5168
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v4.0.
|
|
1
|
+
/*! @hebcal/core v4.0.3 */
|
|
2
2
|
/*
|
|
3
3
|
* More minimal greg routines
|
|
4
4
|
*/
|
|
@@ -168,6 +168,7 @@ function abs2greg(abs) {
|
|
|
168
168
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
169
169
|
*/
|
|
170
170
|
|
|
171
|
+
|
|
171
172
|
/**
|
|
172
173
|
* Gregorian date helper functions.
|
|
173
174
|
*/
|
|
@@ -2744,6 +2745,7 @@ class Zmanim {
|
|
|
2744
2745
|
You should have received a copy of the GNU General Public License
|
|
2745
2746
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
2746
2747
|
*/
|
|
2748
|
+
|
|
2747
2749
|
const classicCities0 = [['Ashdod', 'IL', 31.79213, 34.64966, 'Asia/Jerusalem'], ['Atlanta', 'US', 33.749, -84.38798, 'America/New_York'], ['Austin', 'US', 30.26715, -97.74306, 'America/Chicago'], ['Baghdad', 'IQ', 33.34058, 44.40088, 'Asia/Baghdad'], ['Beer Sheva', 'IL', 31.25181, 34.7913, 'Asia/Jerusalem'], ['Berlin', 'DE', 52.52437, 13.41053, 'Europe/Berlin'], ['Baltimore', 'US', 39.29038, -76.61219, 'America/New_York'], ['Bogota', 'CO', 4.60971, -74.08175, 'America/Bogota'], ['Boston', 'US', 42.35843, -71.05977, 'America/New_York'], ['Budapest', 'HU', 47.49801, 19.03991, 'Europe/Budapest'], ['Buenos Aires', 'AR', -34.61315, -58.37723, 'America/Argentina/Buenos_Aires'], ['Buffalo', 'US', 42.88645, -78.87837, 'America/New_York'], ['Chicago', 'US', 41.85003, -87.65005, 'America/Chicago'], ['Cincinnati', 'US', 39.162, -84.45689, 'America/New_York'], ['Cleveland', 'US', 41.4995, -81.69541, 'America/New_York'], ['Dallas', 'US', 32.78306, -96.80667, 'America/Chicago'], ['Denver', 'US', 39.73915, -104.9847, 'America/Denver'], ['Detroit', 'US', 42.33143, -83.04575, 'America/Detroit'], ['Eilat', 'IL', 29.55805, 34.94821, 'Asia/Jerusalem'], ['Gibraltar', 'GI', 36.14474, -5.35257, 'Europe/Gibraltar'], ['Haifa', 'IL', 32.81841, 34.9885, 'Asia/Jerusalem'], ['Hawaii', 'US', 21.30694, -157.85833, 'Pacific/Honolulu'], ['Helsinki', 'FI', 60.16952, 24.93545, 'Europe/Helsinki'], ['Houston', 'US', 29.76328, -95.36327, 'America/Chicago'], ['Jerusalem', 'IL', 31.76904, 35.21633, 'Asia/Jerusalem'], ['Johannesburg', 'ZA', -26.20227, 28.04363, 'Africa/Johannesburg'], ['Kiev', 'UA', 50.45466, 30.5238, 'Europe/Kiev'], ['La Paz', 'BO', -16.5, -68.15, 'America/La_Paz'], ['Livingston', 'US', 40.79593, -74.31487, 'America/New_York'], ['Las Vegas', 'US', 36.17497, -115.13722, 'America/Los_Angeles'], ['London', 'GB', 51.50853, -0.12574, 'Europe/London'], ['Los Angeles', 'US', 34.05223, -118.24368, 'America/Los_Angeles'], ['Marseilles', 'FR', 43.29695, 5.38107, 'Europe/Paris'], ['Miami', 'US', 25.77427, -80.19366, 'America/New_York'], ['Minneapolis', 'US', 44.97997, -93.26384, 'America/Chicago'], ['Melbourne', 'AU', -37.814, 144.96332, 'Australia/Melbourne'], ['Mexico City', 'MX', 19.42847, -99.12766, 'America/Mexico_City'], ['Montreal', 'CA', 45.50884, -73.58781, 'America/Toronto'], ['Moscow', 'RU', 55.75222, 37.61556, 'Europe/Moscow'], ['New York', 'US', 40.71427, -74.00597, 'America/New_York'], ['Omaha', 'US', 41.25861, -95.93779, 'America/Chicago'], ['Ottawa', 'CA', 45.41117, -75.69812, 'America/Toronto'], ['Panama City', 'PA', 8.9936, -79.51973, 'America/Panama'], ['Paris', 'FR', 48.85341, 2.3488, 'Europe/Paris'], ['Pawtucket', 'US', 41.87871, -71.38256, 'America/New_York'], ['Petach Tikvah', 'IL', 32.08707, 34.88747, 'Asia/Jerusalem'], ['Philadelphia', 'US', 39.95233, -75.16379, 'America/New_York'], ['Phoenix', 'US', 33.44838, -112.07404, 'America/Phoenix'], ['Pittsburgh', 'US', 40.44062, -79.99589, 'America/New_York'], ['Providence', 'US', 41.82399, -71.41283, 'America/New_York'], ['Portland', 'US', 45.52345, -122.67621, 'America/Los_Angeles'], ['Saint Louis', 'US', 38.62727, -90.19789, 'America/Chicago'], ['Saint Petersburg', 'RU', 59.93863, 30.31413, 'Europe/Moscow'], ['San Diego', 'US', 32.71533, -117.15726, 'America/Los_Angeles'], ['San Francisco', 'US', 37.77493, -122.41942, 'America/Los_Angeles'], ['Sao Paulo', 'BR', -23.5475, -46.63611, 'America/Sao_Paulo'], ['Seattle', 'US', 47.60621, -122.33207, 'America/Los_Angeles'], ['Sydney', 'AU', -33.86785, 151.20732, 'Australia/Sydney'], ['Tel Aviv', 'IL', 32.08088, 34.78057, 'Asia/Jerusalem'], ['Tiberias', 'IL', 32.79221, 35.53124, 'Asia/Jerusalem'], ['Toronto', 'CA', 43.70011, -79.4163, 'America/Toronto'], ['Vancouver', 'CA', 49.24966, -123.11934, 'America/Vancouver'], ['White Plains', 'US', 41.03399, -73.76291, 'America/New_York'], ['Washington DC', 'US', 38.89511, -77.03637, 'America/New_York'], ['Worcester', 'US', 42.26259, -71.80229, 'America/New_York']];
|
|
2748
2750
|
const classicCities = Object.create(null);
|
|
2749
2751
|
|
|
@@ -3570,6 +3572,27 @@ function getTodayIsHe(omer) {
|
|
|
3570
3572
|
}
|
|
3571
3573
|
|
|
3572
3574
|
/* eslint-disable new-cap */
|
|
3575
|
+
/*
|
|
3576
|
+
Hebcal - A Jewish Calendar Generator
|
|
3577
|
+
Copyright (c) 1994-2020 Danny Sadinoff
|
|
3578
|
+
Portions copyright Eyal Schachter and Michael J. Radwin
|
|
3579
|
+
|
|
3580
|
+
https://github.com/hebcal/hebcal-es6
|
|
3581
|
+
|
|
3582
|
+
This program is free software; you can redistribute it and/or
|
|
3583
|
+
modify it under the terms of the GNU General Public License
|
|
3584
|
+
as published by the Free Software Foundation; either version 2
|
|
3585
|
+
of the License, or (at your option) any later version.
|
|
3586
|
+
|
|
3587
|
+
This program is distributed in the hope that it will be useful,
|
|
3588
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
3589
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
3590
|
+
GNU General Public License for more details.
|
|
3591
|
+
|
|
3592
|
+
You should have received a copy of the GNU General Public License
|
|
3593
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
3594
|
+
*/
|
|
3595
|
+
|
|
3573
3596
|
const INCOMPLETE = 0;
|
|
3574
3597
|
const REGULAR = 1;
|
|
3575
3598
|
const COMPLETE = 2;
|
|
@@ -4532,6 +4555,9 @@ class HolidayEvent extends Event {
|
|
|
4532
4555
|
}
|
|
4533
4556
|
/** @return {string[]} */
|
|
4534
4557
|
getCategories() {
|
|
4558
|
+
if (this.cholHaMoedDay) {
|
|
4559
|
+
return ['holiday', 'major', 'cholhamoed'];
|
|
4560
|
+
}
|
|
4535
4561
|
const cats = super.getCategories();
|
|
4536
4562
|
if (cats[0] !== 'unknown') {
|
|
4537
4563
|
return cats;
|
|
@@ -5134,7 +5160,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
5134
5160
|
return new HDate(day, month, hyear);
|
|
5135
5161
|
}
|
|
5136
5162
|
|
|
5137
|
-
const version="4.0.
|
|
5163
|
+
const version="4.0.3";
|
|
5138
5164
|
|
|
5139
5165
|
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};
|
|
5140
5166
|
|
package/hebcal.d.ts
CHANGED
|
@@ -126,10 +126,12 @@ declare module '@hebcal/core' {
|
|
|
126
126
|
* Renders this Hebrew date as a translated or transliterated string,
|
|
127
127
|
* including ordinal e.g. `'15th of Cheshvan, 5769'`.
|
|
128
128
|
* @param [locale] Optional locale name (defaults to active locale).
|
|
129
|
+
* @param [showYear] Display year (defaults to `true`).
|
|
129
130
|
*/
|
|
130
|
-
render(locale?: string): number;
|
|
131
|
+
render(locale?: string, showYear?: boolean): number;
|
|
131
132
|
/**
|
|
132
133
|
* Renders this Hebrew date in Hebrew gematriya, regardless of locale.
|
|
134
|
+
* @param [suppressNikud] suppress nekudot (defaults to `false`).
|
|
133
135
|
*/
|
|
134
136
|
renderGematriya(suppressNikud?: boolean): string;
|
|
135
137
|
|
|
@@ -982,6 +984,7 @@ declare module '@hebcal/core' {
|
|
|
982
984
|
constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent?: Event);
|
|
983
985
|
render(locale?: string): string;
|
|
984
986
|
renderBrief(locale?: string): string;
|
|
987
|
+
getCategories(): string[];
|
|
985
988
|
readonly eventTime: Date;
|
|
986
989
|
readonly location: Location;
|
|
987
990
|
readonly eventTimeStr: string;
|
|
@@ -1011,6 +1014,7 @@ declare module '@hebcal/core' {
|
|
|
1011
1014
|
url(): string;
|
|
1012
1015
|
urlDateSuffix(): string;
|
|
1013
1016
|
getEmoji(): string;
|
|
1017
|
+
getCategories(): string[];
|
|
1014
1018
|
readonly cholHaMoedDay?: number;
|
|
1015
1019
|
readonly startEvent?: TimedEvent;
|
|
1016
1020
|
readonly endEvent?: TimedEvent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -67,24 +67,24 @@
|
|
|
67
67
|
"verbose": true
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@babel/core": "^7.21.
|
|
71
|
-
"@babel/preset-env": "^7.21.
|
|
70
|
+
"@babel/core": "^7.21.8",
|
|
71
|
+
"@babel/preset-env": "^7.21.5",
|
|
72
72
|
"@babel/register": "^7.21.0",
|
|
73
73
|
"@hebcal/solar-calc": "^1.1.2",
|
|
74
74
|
"@rollup/plugin-babel": "^6.0.3",
|
|
75
|
-
"@rollup/plugin-commonjs": "^
|
|
75
|
+
"@rollup/plugin-commonjs": "^25.0.0",
|
|
76
76
|
"@rollup/plugin-json": "^6.0.0",
|
|
77
77
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
78
78
|
"@rollup/plugin-terser": "^0.4.1",
|
|
79
79
|
"ava": "^5.2.0",
|
|
80
80
|
"codecov": "^3.8.3",
|
|
81
|
-
"core-js": "^3.30.
|
|
82
|
-
"eslint": "^8.
|
|
81
|
+
"core-js": "^3.30.2",
|
|
82
|
+
"eslint": "^8.40.0",
|
|
83
83
|
"eslint-config-google": "^0.14.0",
|
|
84
84
|
"jsdoc": "^4.0.2",
|
|
85
85
|
"jsdoc-to-markdown": "^8.0.0",
|
|
86
86
|
"nyc": "^15.1.0",
|
|
87
|
-
"rollup": "^3.21.
|
|
87
|
+
"rollup": "^3.21.7",
|
|
88
88
|
"ttag-cli": "^1.10.5"
|
|
89
89
|
}
|
|
90
90
|
}
|