Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

leap-year

CI codecov deno doc

Custom badge Custom badge Custom badge

Check if a year is a leap year.

Usage

Deno πŸš€

import { isLeapYear } from "https://deno.land/x/leap_year/mod.ts";

isLeapYear(2014); //=> false
isLeapYear(2016); //=> true
isLeapYear("6 October 2006 00:07:00 GMT"); //=> false
isLeapYear("2000"); //=> false
isLeapYear(new Date(2016, 1, 1)); //=> true

Node.js 🐒

import { isLeapYear } from "@ultirequiem/leap-year";

Browser πŸ•Έ

You can use any CDN that you like.

As an example, for type module πŸ‘‡

Or for a plain script tag πŸ¦”

The API is the same on all this platforms.

API

Autogenerated Documentation πŸš€

Support

Open an Issue, I will check it a soon as possible πŸ‘€

If you want to hurry me up a bit send me a tweet πŸ˜†

Consider supporting me on Patreon if you like my work πŸš€

Don’t forget to start the repo ⭐

Licence

Licensed under the MIT License.