Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/datetime/is_leap.ts

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.224.0/datetime/is_leap.ts";

Functions

Returns whether the given year is a leap year. Passing in a Date object will return the leap year status of the year of that object and take the current timezone into account. Passing in a number will return the leap year status of that number.

Returns whether the given year is a leap year in UTC time. This always returns the same value regardless of the local timezone.