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
664 B
1 lines
664 B
"use strict";var e={name:"arabic",startYear:1,yearLength:354,epoch:1948438,century:14,weekStartDayIndex:0,getMonthLengths:e=>[30,29,30,29,30,29,30,29,30,29,30,e?30:29],isLeap:e=>[2,5,7,10,13,15,18,21,24,26,29].includes(e%30),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({year:e,month:t,day:a}){let r=this.getMonthLengths(this.isLeap(e));for(let e=0;e<t.index;e++)a+=r[e];return a},getAllDays(e){const{year:t}=e;return this.yearLength*(t-1)+this.leapsLength(t)+this.getDayOfYear(e)},leapsLength:e=>11/30*(e-1)+.5|0,guessYear:(e,t)=>~~((e-.5)/354.366)+(t>0?1:-1)};module.exports=e;
|
|
|