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
672 B

"use strict";var e={name:"indian",startYear:0,yearLength:365,epoch:1749628,century:19,weekStartDayIndex:1,getMonthLengths:e=>[e?31:30,31,31,31,31,31,30,30,30,30,30,30],isLeap:e=>(e+=78)%4==0&&e%100!=0||e%400==0,getLeaps(e){let t=0,a=[];for(;e>0?t<=e:e<=t;)this.isLeap(t)&&a.push(t),e>0?t++:t--;return a},getDayOfYear({year:e,month:{number:t},day:a}){let s=this.getMonthLengths(this.isLeap(e));for(let e=0;e<t-1;e++)a+=s[e];return a},getAllDays(e){const{year:t}=e;return this.yearLength*t+(this.leapsLength(t+78)-this.leapsLength(78))+this.getDayOfYear(e)},leapsLength:e=>((e-1)/4|0)+(-(e-1)/100|0)+((e-1)/400|0),guessYear:(e,t)=>~~(e/365.24)+(t>0?1:-1)};module.exports=e;