PP.Date.isLeapYear(date): Boolean;
date. Date. Date.
The isLeapYear static method returns whether the year of the specified date is a leap year.
To execute the example, add a link to PP.js scenario file to HTML page.
// Create the current date date = new Date(); // Determine whether the year is a leap year leap= PP.Date.isLeapYear(date); console.log(leap ? "Leap year" : "Not leap year");
After executing the example it is determined whether the year is a leap year.
See also: