You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
625 B

"use strict";var e={name:"jalali",startYear:1,yearLength:365,epoch:1948319,century:14,weekStartDayIndex:0,getMonthLengths:e=>[31,31,31,31,31,31,30,30,30,30,30,e?30:29],isLeap:e=>(e+12)%33%4==1,getLeaps(e){if(0===e)return;let t=e>0?1:-1,a=[];for(;e>0?t<=e:e<=t;)this.isLeap(t)&&a.push(t),e>0?t++:t--;return a},getDayOfYear:({month:{index:e},day:t})=>(e<=6?31*e:186+30*(e-6))+t,getAllDays(e){const{year:t}=e;return this.yearLength*(t-1)+this.leapsLength(t)+this.getDayOfYear(e)},leapsLength(e){return(682*(474+((t=e-474)-(a=2820)*(t/a|0)))-110)/2816|0;var t,a},guessYear:(e,t)=>~~((e+.5)/365.241)+(t>0?1:-1)};module.exports=e;