⏳

Leap year checks in PHP, Java and JavaScript: namespace Timely\Years, Java package timely.years.

## Helper The same class and method names in every language: - [`Helper.php`](https://github.com/hermajan/time/blob/master/src/timely/years/Helper.php), [`Helper.java`](https://github.com/hermajan/time/blob/master/src/timely/years/Helper.java) and [`YearHelper.js`](https://github.com/hermajan/time/blob/master/src/timely/years/Helper.js) (`Timely.Helper`, see [JavaScript](JavaScript.md)). - `isLeap(year)`: Checks if the year is leap using the Gregorian rules (divisible by 4, except centuries not divisible by 400). - `isLeap2(year)`: The same using a library function (`java.time.Year.isLeap()` in Java, `Converter` in JavaScript, `date("L")` in PHP). ```php use Timely\Years\Helper; Helper::isLeap(2000); // true Helper::isLeap(1900); // false ``` ```js Timely.Helper.isLeap(2024); // true ``` Try it in the [Examples](Examples.md) (`examples/years.html`).