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

dayOfYearfunction

The day of the year of a moment in UTC: 1 on 1 January.

Import it

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

Definition

function dayOfYear(when: When, calendar?: Calendar): number

Parameters

NameTypeDescription
whenWhen

A Date or milliseconds since 1970 (UTC).

calendar (optional)Calendar

auto (default), gregorian or julian.

Returns

number

1 to 366.

Examples

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

console.log(dayOfYear(Date.UTC(1978, 10, 14)), dayOfYear(Date.UTC(1988, 3, 22)));
318 113

What it prints (run when this page was built)

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