Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference · Julian dates (and the julian package's functions), calendars, time scales, sidereal time and Mars time

isLeapYearfunction

Whether a year is a leap year.

Import it

import { isLeapYear } from "@johnmorrisdotca/wakusei-planets/time";

Definition

function isLeapYear(year: number, calendar?: Calendar): boolean

Parameters

NameTypeDescription
yearnumber

The astronomical year.

calendar (optional)Calendar

gregorian (a century is a leap year only if divisible by 400), julian (every fourth year), or auto (the Julian rule to 1582, the Gregorian after).

Returns

boolean

true for a leap year.

Examples

import { isLeapYear } from "@johnmorrisdotca/wakusei-planets/time";

console.log(isLeapYear(1900), isLeapYear(1900, "julian"), isLeapYear(2000));
false true true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.