How to use the jalaali-js.isLeapJalaaliYear function in jalaali-js

To help you get started, we’ve selected a few jalaali-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github babakhani / PersianDate / test / leap-year.js View on Github external
}

            if (birash && algo) {
                totalCommonBirashkAlgo++;
            }

            if (wikiPython && astro) {
                totalCommonWikiAstro++;
            }

            if (wikiPython && algo) {
                totalCommonWikiAlgo++;
            }

            try {
                if (jalaali.isLeapJalaaliYear(i)) {
                    totalLeapCountInJalaali++;
                }
            }
            catch (err) {
                totalJalaaliErrorCount++;
            }
            i++;
        }

        console.log("- Total gregorian leap year: " + totalLeapCountInGre);
        console.log("- Total Nasa algorithm leap year: " + totalNasaAlgorithmCount);
        console.log("- Total Algorithmic leap year: " + totalLeapCountInAlg);
        console.log("- Total Astronomical leap year: " + totalLeapCountInAstro);
        console.log("- Total Behrooz_Birashk leap year: " + totalLeapCountInBirashk);
        console.log("- Total Wikipedia python code leap year: " + totalLeapCountInWikiPythonCode);
        console.log('');

jalaali-js

Converts Gregorian and Jalaali calendars to each other

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis