Every line of 'javascript leapyear' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
80 function isLeapYear(year) { 81 return (year % 4 == 0 && year % 100 != 0) || year % 400 ==0; 82 }
52 function isLeapYear(year) { 53 return (0 == year % 400) 54 || ((0 == year % 4) && (0 != year % 100)) 55 || (0 == year); 56 }
850 function leapYear(year) { 851 year = year.getFullYear(); 852 return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0); 853 }
223 function getLunarLeapYear(year){ 224 var yearData = lunarInfo[year-minYear]; 225 return yearData[0]; 226 };
33 function isLeapYear(year) { 34 return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0); 35 }
7 export function isLeapYear(year: number): boolean { 8 return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0) 9 }
8 isLeap (year) { 9 // calculation source: https://fa.wikipedia.org/wiki/%D8%B3%D8%A7%D9%84_%DA%A9%D8%A8%DB%8C%D8%B3%D9%87 10 const list = [ 11 0, 12 4, 13 8, 14 12, 15 16, 16 20, 17 year > 473 ? 24 : 25, 18 29, 19 33, 20 37, 21 41, 22 45, 23 49, 24 53, 25 year > 473 ? 57 : 58, 26 62, 27 66, 28 70, 29 74, 30 78, 31 82, 32 86, 33 year > 473 ? 90 : 91, 34 95, 35 99, 36 103, 37 107, 38 111, 39 115, 40 year > 473 ? 119 : 120, 41 124 42 ] 43 return list.includes(year % 128) 44 }
73 export function getIsLeapYear () { 74 return isLeapYear(this.year()); 75 }
67 isLeapYear(year: number): boolean { 68 return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0); 69 }
864 function IsLeapYear (year) { 865 throw new Error('Not implemented'); 866 }