New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jewish-date

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jewish-date - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

6

CHANGELOG.md
# Changelog
## 2.0.3
- Added new method ```calcDaysInMonth (jewishYear: number,jewishMonth: JewishMonthType)``` will calculate the number of days in a Jewish month for a given Jewish year.
## 2.0.1
- Add Support for ESM (ES modules)
- Added Support for ESM (ES modules)

2

dist/index.js

@@ -1,2 +0,2 @@

var z=Object.create;var d=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var L=(e,r)=>{for(var n in r)d(e,n,{get:r[n],enumerable:!0})},I=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of K(r))!q.call(e,s)&&s!==n&&d(e,s,{get:()=>r[s],enumerable:!(o=G(r,s))||o.enumerable});return e};var P=(e,r,n)=>(n=e!=null?z(R(e)):{},I(r||!e||!e.__esModule?d(n,"default",{value:e,enumerable:!0}):n,e)),_=e=>I(d({},"__esModule",{value:!0}),e);var Z={};L(Z,{JewishMonth:()=>t,convertNumberToHebrew:()=>y,formatJewishDate:()=>Q,formatJewishDateInHebrew:()=>X,getIndexByJewishMonth:()=>H,getJewishMonthByIndex:()=>j,getJewishMonthInHebrew:()=>S,getJewishMonthsInOrder:()=>E,isLeapYear:()=>J,toGregorianDate:()=>V,toHebrewJewishDate:()=>C,toJewishDate:()=>U});module.exports=_(Z);var t={None:"None",Tishri:"Tishri",Cheshvan:"Cheshvan",Kislev:"Kislev",Tevet:"Tevet",Shevat:"Shevat",Adar:"Adar",Nisan:"Nisan",Iyyar:"Iyyar",Sivan:"Sivan",Tammuz:"Tammuz",Av:"Av",Elul:"Elul",AdarI:"AdarI",AdarII:"AdarII"};var x=17214255e-1,W=347995.5;function c(e,r){return e-r*Math.floor(e/r)}function D(e){return e%4===0&&!(e%100===0&&e%400!==0)}function w(e,r,n){return x-1+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*r-362)/12+(r<=2?0:D(e)?-1:-2)+n)}function g(e){let r=Math.floor(e-.5)+.5,n=r-x,o=Math.floor(n/146097),s=c(n,146097),a=Math.floor(s/36524),h=c(s,36524),b=Math.floor(h/1461),i=c(h,1461),M=Math.floor(i/365),u=o*400+a*100+b*4+M;a===4||M===4||u++;let $=r-w(u,1,1),O=r<w(u,3,1)?0:D(u)?1:2,v=Math.floor((($+O)*12+373)/367),Y=r-w(u,v,1)+1;return[u,v,Y]}function A(e){return c(e*7+1,19)<7}function k(e){return A(e)?13:12}function f(e){let r=Math.floor((235*e-234)/19),n=12084+13753*r,o=r*29+Math.floor(n/25920);return c(3*(o+1),7)<3&&o++,o}function F(e){let r=f(e-1),n=f(e);return f(e+1)-n===356?2:n-r===382?1:0}function T(e){return m(e+1,7,1)-m(e,7,1)}function l(e,r){return r===2||r===4||r===6||r===10||r===13||r===12&&!A(e)||r===8&&c(T(e),10)!==5||r===9&&c(T(e),10)===3?29:30}function m(e,r,n){let o,s=k(e),a=W+f(e)+F(e)+n+1;if(r<7){for(o=7;o<=s;o++)a+=l(e,o);for(o=1;o<r;o++)a+=l(e,o)}else for(o=7;o<r;o++)a+=l(e,o);return a}function N(e){let n,o,s=Math.floor(e)+.5,a=Math.floor((s-347995.5)*98496/35975351);n=a-1;for(let i=a;s>=m(i,7,1);i++)n++;let h=s<m(n,1,1)?7:1;o=h;for(let i=h;s>m(n,i,l(n,i));i++)o++;let b=s-m(n,o,1)+1;return[n,o,b]}var p=(e,r)=>e.toString().padStart(r,"0");var J=e=>{let r=e%19;return r===0||r===3||r===6||r===8||r===11||r===14||r===17},H=e=>({[t.None]:0,[t.Tishri]:7,[t.Cheshvan]:8,[t.Kislev]:9,[t.Tevet]:10,[t.Shevat]:11,[t.Adar]:12,[t.AdarI]:12,[t.AdarII]:13,[t.Nisan]:1,[t.Iyyar]:2,[t.Sivan]:3,[t.Tammuz]:4,[t.Av]:5,[t.Elul]:6})[e]||0,j=(e,r)=>{let o=[t.None,t.Nisan,t.Iyyar,t.Sivan,t.Tammuz,t.Av,t.Elul,t.Tishri,t.Cheshvan,t.Kislev,t.Tevet,t.Shevat,t.Adar,t.AdarII][e]||t.None;return o===t.Adar&&J(r)?t.AdarI:o},E=e=>{let r=[t.None,t.Tishri,t.Cheshvan,t.Kislev,t.Tevet,t.Shevat,t.AdarI,t.AdarII,t.Nisan,t.Iyyar,t.Sivan,t.Tammuz,t.Av,t.Elul];return J(e)?r:r.filter(n=>n!=="AdarII").map(n=>n==="AdarI"?"Adar":n)},Q=e=>`${e.day} ${e.monthName} ${e.year}`,U=e=>{let r=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),s=w(r,n,o),a=N(s),h=a[0],b=j(a[1],h),i=E(h).findIndex(u=>u===b);return{year:h,monthName:b,month:i,day:a[2]}},V=e=>{let r=H(e.monthName),n=m(e.year,r,e.day),o=g(n),s=`${p(o[0],4)}-${p(o[1],2)}-${p(o[2],2)}`,a=new Date(s);return a.getHours()>0&&a.setHours(0,0,0,0),a};var B=P(require("gematriya"));var S=e=>({[t.None]:"\u05DC\u05DC\u05D0",[t.Tishri]:"\u05EA\u05E9\u05E8\u05D9",[t.Cheshvan]:"\u05D7\u05E9\u05D5\u05DF",[t.Kislev]:"\u05DB\u05E1\u05DC\u05D5",[t.Tevet]:"\u05D8\u05D1\u05EA",[t.Shevat]:"\u05E9\u05D1\u05D8",[t.Adar]:"\u05D0\u05D3\u05E8",[t.AdarI]:"\u05D0\u05D3\u05E8 \u05D0",[t.AdarII]:"\u05D0\u05D3\u05E8 \u05D1",[t.Nisan]:"\u05E0\u05D9\u05E1\u05DF",[t.Iyyar]:"\u05D0\u05D9\u05D9\u05E8",[t.Sivan]:"\u05E1\u05D9\u05D5\u05DF",[t.Tammuz]:"\u05EA\u05DE\u05D5\u05D6",[t.Av]:"\u05D0\u05D1",[t.Elul]:"\u05D0\u05DC\u05D5\u05DC"})[e],y=(e,r=!0,n=!0)=>(0,B.default)(e,{geresh:r,punctuate:n}),C=e=>({day:y(e.day),monthName:S(e.monthName),year:y(e.year)}),X=e=>{let r=C(e);return`${r.day} ${r.monthName} ${r.year}`};
var z=Object.create;var f=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of K(t))!q.call(e,s)&&s!==n&&f(e,s,{get:()=>t[s],enumerable:!(o=G(t,s))||o.enumerable});return e};var P=(e,t,n)=>(n=e!=null?z(R(e)):{},v(t||!e||!e.__esModule?f(n,"default",{value:e,enumerable:!0}):n,e)),_=e=>v(f({},"__esModule",{value:!0}),e);var ee={};L(ee,{JewishMonth:()=>r,calcDaysInMonth:()=>X,convertNumberToHebrew:()=>I,formatJewishDate:()=>Q,formatJewishDateInHebrew:()=>Z,getIndexByJewishMonth:()=>J,getJewishMonthByIndex:()=>j,getJewishMonthInHebrew:()=>B,getJewishMonthsInOrder:()=>E,isLeapYear:()=>y,toGregorianDate:()=>V,toHebrewJewishDate:()=>C,toJewishDate:()=>U});module.exports=_(ee);var r={None:"None",Tishri:"Tishri",Cheshvan:"Cheshvan",Kislev:"Kislev",Tevet:"Tevet",Shevat:"Shevat",Adar:"Adar",Nisan:"Nisan",Iyyar:"Iyyar",Sivan:"Sivan",Tammuz:"Tammuz",Av:"Av",Elul:"Elul",AdarI:"AdarI",AdarII:"AdarII"};var D=17214255e-1,W=347995.5;function c(e,t){return e-t*Math.floor(e/t)}function g(e){return e%4===0&&!(e%100===0&&e%400!==0)}function d(e,t,n){return D-1+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*t-362)/12+(t<=2?0:g(e)?-1:-2)+n)}function A(e){let t=Math.floor(e-.5)+.5,n=t-D,o=Math.floor(n/146097),s=c(n,146097),a=Math.floor(s/36524),h=c(s,36524),b=Math.floor(h/1461),i=c(h,1461),M=Math.floor(i/365),u=o*400+a*100+b*4+M;a===4||M===4||u++;let $=t-d(u,1,1),O=t<d(u,3,1)?0:g(u)?1:2,x=Math.floor((($+O)*12+373)/367),Y=t-d(u,x,1)+1;return[u,x,Y]}function N(e){return c(e*7+1,19)<7}function k(e){return N(e)?13:12}function l(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,o=t*29+Math.floor(n/25920);return c(3*(o+1),7)<3&&o++,o}function F(e){let t=l(e-1),n=l(e);return l(e+1)-n===356?2:n-t===382?1:0}function T(e){return m(e+1,7,1)-m(e,7,1)}function w(e,t){return t===2||t===4||t===6||t===10||t===13||t===12&&!N(e)||t===8&&c(T(e),10)!==5||t===9&&c(T(e),10)===3?29:30}function m(e,t,n){let o,s=k(e),a=W+l(e)+F(e)+n+1;if(t<7){for(o=7;o<=s;o++)a+=w(e,o);for(o=1;o<t;o++)a+=w(e,o)}else for(o=7;o<t;o++)a+=w(e,o);return a}function H(e){let n,o,s=Math.floor(e)+.5,a=Math.floor((s-347995.5)*98496/35975351);n=a-1;for(let i=a;s>=m(i,7,1);i++)n++;let h=s<m(n,1,1)?7:1;o=h;for(let i=h;s>m(n,i,w(n,i));i++)o++;let b=s-m(n,o,1)+1;return[n,o,b]}var p=(e,t)=>e.toString().padStart(t,"0");var y=e=>{let t=e%19;return t===0||t===3||t===6||t===8||t===11||t===14||t===17},J=e=>({[r.None]:0,[r.Tishri]:7,[r.Cheshvan]:8,[r.Kislev]:9,[r.Tevet]:10,[r.Shevat]:11,[r.Adar]:12,[r.AdarI]:12,[r.AdarII]:13,[r.Nisan]:1,[r.Iyyar]:2,[r.Sivan]:3,[r.Tammuz]:4,[r.Av]:5,[r.Elul]:6})[e]||0,j=(e,t)=>{let o=[r.None,r.Nisan,r.Iyyar,r.Sivan,r.Tammuz,r.Av,r.Elul,r.Tishri,r.Cheshvan,r.Kislev,r.Tevet,r.Shevat,r.Adar,r.AdarII][e]||r.None;return o===r.Adar&&y(t)?r.AdarI:o},E=e=>{let t=[r.None,r.Tishri,r.Cheshvan,r.Kislev,r.Tevet,r.Shevat,r.AdarI,r.AdarII,r.Nisan,r.Iyyar,r.Sivan,r.Tammuz,r.Av,r.Elul];return y(e)?t:t.filter(n=>n!=="AdarII").map(n=>n==="AdarI"?"Adar":n)},Q=e=>`${e.day} ${e.monthName} ${e.year}`,U=e=>{let t=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),s=d(t,n,o),a=H(s),h=a[0],b=j(a[1],h),i=E(h).findIndex(u=>u===b);return{year:h,monthName:b,month:i,day:a[2]}},V=e=>{let t=J(e.monthName),n=m(e.year,t,e.day),o=A(n),s=`${p(o[0],4)}-${p(o[1],2)}-${p(o[2],2)}`,a=new Date(s);return a.getHours()>0&&a.setHours(0,0,0,0),a},X=(e,t)=>{let n=J(t);return w(e,n)};var S=P(require("gematriya"));var B=e=>({[r.None]:"\u05DC\u05DC\u05D0",[r.Tishri]:"\u05EA\u05E9\u05E8\u05D9",[r.Cheshvan]:"\u05D7\u05E9\u05D5\u05DF",[r.Kislev]:"\u05DB\u05E1\u05DC\u05D5",[r.Tevet]:"\u05D8\u05D1\u05EA",[r.Shevat]:"\u05E9\u05D1\u05D8",[r.Adar]:"\u05D0\u05D3\u05E8",[r.AdarI]:"\u05D0\u05D3\u05E8 \u05D0",[r.AdarII]:"\u05D0\u05D3\u05E8 \u05D1",[r.Nisan]:"\u05E0\u05D9\u05E1\u05DF",[r.Iyyar]:"\u05D0\u05D9\u05D9\u05E8",[r.Sivan]:"\u05E1\u05D9\u05D5\u05DF",[r.Tammuz]:"\u05EA\u05DE\u05D5\u05D6",[r.Av]:"\u05D0\u05D1",[r.Elul]:"\u05D0\u05DC\u05D5\u05DC"})[e],I=(e,t=!0,n=!0)=>(0,S.default)(e,{geresh:t,punctuate:n}),C=e=>({day:I(e.day),monthName:B(e.monthName),year:I(e.year)}),Z=e=>{let t=C(e);return`${t.day} ${t.monthName} ${t.year}`};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{JewishMonth as e}from"./interfaces";import{gregorianToJd as u,hebrewToJd as y,jdToGregorian as J,jdToHebrew as I}from"./utils/dateUtils";import{toLength as i}from"./utils/numberUtils";const m=t=>{const n=t%19;return n===0||n===3||n===6||n===8||n===11||n===14||n===17},v=t=>({[e.None]:0,[e.Tishri]:7,[e.Cheshvan]:8,[e.Kislev]:9,[e.Tevet]:10,[e.Shevat]:11,[e.Adar]:12,[e.AdarI]:12,[e.AdarII]:13,[e.Nisan]:1,[e.Iyyar]:2,[e.Sivan]:3,[e.Tammuz]:4,[e.Av]:5,[e.Elul]:6})[t]||0,M=(t,n)=>{const s=[e.None,e.Nisan,e.Iyyar,e.Sivan,e.Tammuz,e.Av,e.Elul,e.Tishri,e.Cheshvan,e.Kislev,e.Tevet,e.Shevat,e.Adar,e.AdarII][t]||e.None;return s===e.Adar&&m(n)?e.AdarI:s},T=t=>{const n=[e.None,e.Tishri,e.Cheshvan,e.Kislev,e.Tevet,e.Shevat,e.AdarI,e.AdarII,e.Nisan,e.Iyyar,e.Sivan,e.Tammuz,e.Av,e.Elul];return m(t)?n:n.filter(r=>r!=="AdarII").map(r=>r==="AdarI"?"Adar":r)},j=t=>`${t.day} ${t.monthName} ${t.year}`,b=t=>{const n=t.getFullYear(),r=t.getMonth()+1,s=t.getDate(),a=u(n,r,s),o=I(a),h=o[0],c=M(o[1],h),w=T(h).findIndex(d=>d===c);return{year:h,monthName:c,month:w,day:o[2]}},S=t=>{const n=v(t.monthName),r=y(t.year,n,t.day),s=J(r),a=`${i(s[0],4)}-${i(s[1],2)}-${i(s[2],2)}`,o=new Date(a);return o.getHours()>0&&o.setHours(0,0,0,0),o};export{j as formatJewishDate,v as getIndexByJewishMonth,M as getJewishMonthByIndex,T as getJewishMonthsInOrder,m as isLeapYear,S as toGregorianDate,b as toJewishDate};
import{JewishMonth as e}from"./interfaces";import{gregorianToJd as y,hebrewMonthDays as I,hebrewToJd as J,jdToGregorian as M,jdToHebrew as p}from"./utils/dateUtils";import{toLength as i}from"./utils/numberUtils";const m=t=>{const n=t%19;return n===0||n===3||n===6||n===8||n===11||n===14||n===17},w=t=>({[e.None]:0,[e.Tishri]:7,[e.Cheshvan]:8,[e.Kislev]:9,[e.Tevet]:10,[e.Shevat]:11,[e.Adar]:12,[e.AdarI]:12,[e.AdarII]:13,[e.Nisan]:1,[e.Iyyar]:2,[e.Sivan]:3,[e.Tammuz]:4,[e.Av]:5,[e.Elul]:6})[t]||0,T=(t,n)=>{const o=[e.None,e.Nisan,e.Iyyar,e.Sivan,e.Tammuz,e.Av,e.Elul,e.Tishri,e.Cheshvan,e.Kislev,e.Tevet,e.Shevat,e.Adar,e.AdarII][t]||e.None;return o===e.Adar&&m(n)?e.AdarI:o},v=t=>{const n=[e.None,e.Tishri,e.Cheshvan,e.Kislev,e.Tevet,e.Shevat,e.AdarI,e.AdarII,e.Nisan,e.Iyyar,e.Sivan,e.Tammuz,e.Av,e.Elul];return m(t)?n:n.filter(r=>r!=="AdarII").map(r=>r==="AdarI"?"Adar":r)},j=t=>`${t.day} ${t.monthName} ${t.year}`,f=t=>{const n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate(),a=y(n,r,o),s=p(a),h=s[0],c=T(s[1],h),d=v(h).findIndex(u=>u===c);return{year:h,monthName:c,month:d,day:s[2]}},S=t=>{const n=w(t.monthName),r=J(t.year,n,t.day),o=M(r),a=`${i(o[0],4)}-${i(o[1],2)}-${i(o[2],2)}`,s=new Date(a);return s.getHours()>0&&s.setHours(0,0,0,0),s},$=(t,n)=>{const r=w(n);return I(t,r)};export{$ as calcDaysInMonth,j as formatJewishDate,w as getIndexByJewishMonth,T as getJewishMonthByIndex,v as getJewishMonthsInOrder,m as isLeapYear,S as toGregorianDate,f as toJewishDate};
//# sourceMappingURL=jewishDate.js.map

@@ -1,2 +0,2 @@

const p=17214255e-1,R=347995.5;function c(n,r){return n-r*Math.floor(n/r)}function E(n){return n%4===0&&!(n%100===0&&n%400!==0)}function d(n,r,t){return p-1+365*(n-1)+Math.floor((n-1)/4)+-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*r-362)/12+(r<=2?0:E(n)?-1:-2)+t)}function C(n){const r=Math.floor(n-.5)+.5,t=r-p,e=Math.floor(t/146097),o=c(t,146097),u=Math.floor(o/36524),s=c(o,36524),i=Math.floor(s/1461),b=c(s,1461),h=Math.floor(b/365);let f=e*400+u*100+i*4+h;u===4||h===4||f++;const x=r-d(f,1,1),j=r<d(f,3,1)?0:E(f)?1:2,M=Math.floor(((x+j)*12+373)/367),O=r-d(f,M,1)+1;return[f,M,O]}function H(n){return c(n*7+1,19)<7}function g(n){return H(n)?13:12}function l(n){const r=Math.floor((235*n-234)/19),t=12084+13753*r;let e=r*29+Math.floor(t/25920);return c(3*(e+1),7)<3&&e++,e}function q(n){const r=l(n-1),t=l(n);return l(n+1)-t===356?2:t-r===382?1:0}function w(n){return m(n+1,7,1)-m(n,7,1)}function a(n,r){return r===2||r===4||r===6||r===10||r===13||r===12&&!H(n)||r===8&&c(w(n),10)!==5||r===9&&c(w(n),10)===3?29:30}function m(n,r,t){let e;const o=g(n);let u=R+l(n)+q(n)+t+1;if(r<7){for(e=7;e<=o;e++)u+=a(n,e);for(e=1;e<r;e++)u+=a(n,e)}else for(e=7;e<r;e++)u+=a(n,e);return u}function D(n){let t,e;const o=Math.floor(n)+.5,u=Math.floor((o-347995.5)*98496/35975351);t=u-1;for(let b=u;o>=m(b,7,1);b++)t++;const s=o<m(t,1,1)?7:1;e=s;for(let b=s;o>m(t,b,a(t,b));b++)e++;const i=o-m(t,e,1)+1;return[t,e,i]}export{d as gregorianToJd,m as hebrewToJd,C as jdToGregorian,D as jdToHebrew,c as mod};
const p=17214255e-1,R=347995.5;function c(n,r){return n-r*Math.floor(n/r)}function E(n){return n%4===0&&!(n%100===0&&n%400!==0)}function d(n,r,t){return p-1+365*(n-1)+Math.floor((n-1)/4)+-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*r-362)/12+(r<=2?0:E(n)?-1:-2)+t)}function C(n){const r=Math.floor(n-.5)+.5,t=r-p,e=Math.floor(t/146097),o=c(t,146097),u=Math.floor(o/36524),s=c(o,36524),i=Math.floor(s/1461),b=c(s,1461),h=Math.floor(b/365);let f=e*400+u*100+i*4+h;u===4||h===4||f++;const x=r-d(f,1,1),j=r<d(f,3,1)?0:E(f)?1:2,M=Math.floor(((x+j)*12+373)/367),O=r-d(f,M,1)+1;return[f,M,O]}function H(n){return c(n*7+1,19)<7}function g(n){return H(n)?13:12}function l(n){const r=Math.floor((235*n-234)/19),t=12084+13753*r;let e=r*29+Math.floor(t/25920);return c(3*(e+1),7)<3&&e++,e}function q(n){const r=l(n-1),t=l(n);return l(n+1)-t===356?2:t-r===382?1:0}function w(n){return m(n+1,7,1)-m(n,7,1)}function a(n,r){return r===2||r===4||r===6||r===10||r===13||r===12&&!H(n)||r===8&&c(w(n),10)!==5||r===9&&c(w(n),10)===3?29:30}function m(n,r,t){let e;const o=g(n);let u=R+l(n)+q(n)+t+1;if(r<7){for(e=7;e<=o;e++)u+=a(n,e);for(e=1;e<r;e++)u+=a(n,e)}else for(e=7;e<r;e++)u+=a(n,e);return u}function D(n){let t,e;const o=Math.floor(n)+.5,u=Math.floor((o-347995.5)*98496/35975351);t=u-1;for(let b=u;o>=m(b,7,1);b++)t++;const s=o<m(t,1,1)?7:1;e=s;for(let b=s;o>m(t,b,a(t,b));b++)e++;const i=o-m(t,e,1)+1;return[t,e,i]}export{d as gregorianToJd,a as hebrewMonthDays,m as hebrewToJd,C as jdToGregorian,D as jdToHebrew,c as mod};
//# sourceMappingURL=dateConverterUtils.js.map

@@ -52,1 +52,8 @@ /**

export declare const toGregorianDate: (jewishDate: BasicJewishDate) => Date;
/**
* Calculates the number of days in a Jewish month for a given Jewish year.
* @param {number} jewishYear - The Jewish year for which the calculation is performed.
* @param {JewishMonthType} jewishMonth - The type of Jewish month (e.g., 'Heshvan', 'Kislev').
* @returns {number} - The number of days in the specified Jewish month of the given year.
*/
export declare const calcDaysInMonth: (jewishYear: number, jewishMonth: JewishMonthType) => number;

@@ -32,2 +32,9 @@ /**

/**
* Calculates the number of days in the specified month of the Hebrew year.
* @param {number} year - The Hebrew year.
* @param {number} month - The month of the year, where Nisan is 1 and Adar II (in leap years) is 13.
* @returns {number} - The number of days in the specified month.
*/
export declare function hebrewMonthDays(year: number, month: number): 29 | 30;
/**
* Converts a Hebrew date to the corresponding Julian day.

@@ -34,0 +41,0 @@ * @param {number} year - The Hebrew year.

{
"name": "jewish-date",
"description": "Converts Gregorian dates to Hebrew dates and vice versa.",
"version": "2.0.3",
"version": "2.0.4",
"license": "MIT",

@@ -22,5 +22,5 @@ "main": "dist/index.js",

"build": "yarn lint && yarn clean && esr ./config/build.ts",
"lint": "yarn rome format src && yarn rome check src",
"lint": "yarn biome check ./src",
"clean": "rimraf dist",
"test": "vitest --config ./config/vitest.config.ts --coverage",
"test": "vitest --config ./config/vitest/vitest.config.ts --coverage",
"p": "yarn pack --out %s-%v.tgz",

@@ -31,18 +31,18 @@ "inc-version": "yarn version patch",

"devDependencies": {
"@types/gematriya": "^2.0.2",
"@types/node": "^16.18.38",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@vitest/coverage-v8": "^0.33.0",
"esbuild": "^0.18.11",
"esbuild-node-externals": "^1.8.0",
"@biomejs/biome": "^1.4.0",
"@types/gematriya": "^2.0.5",
"@types/node": "^18.18.9",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitest/coverage-v8": "^0.34.6",
"esbuild": "^0.19.5",
"esbuild-node-externals": "^1.9.0",
"esbuild-runner": "^2.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.1",
"rome": "^12.1.3",
"tsc-prog": "^2.2.1",
"typescript": "^5.1.6",
"vite": "^4.4.1",
"vitest": "^0.33.0"
"rimraf": "^5.0.5",
"tsc-prog": "^2.3.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.6"
},

@@ -52,3 +52,3 @@ "dependencies": {

},
"packageManager": "yarn@3.6.1",
"packageManager": "yarn@3.6.4",
"husky": {

@@ -55,0 +55,0 @@ "hooks": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc