Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · /chart

markerSpanfunction

The first and last moment among the markers: what a time slider spans.

Import it

import { markerSpan } from "@johnmorrisdotca/hoshi-stars/chart";

Definition

function markerSpan(markers: readonly SkyMarker[]): { from: number; to: number; } | undefined

Parameters

NameTypeDescription
markersreadonly SkyMarker[]

The markers.

Returns

{ from: number; to: number; } | undefined

The earliest and latest date in milliseconds, or undefined when no marker has a date.

Examples

import { markerSpan } from "@johnmorrisdotca/hoshi-stars/chart";

const span = markerSpan([{ ra: 0, dec: 0, date: "2026-11-01" }, { ra: 1, dec: 1, date: "2026-11-03" }, { ra: 2, dec: 2 }]);
console.log(span ? (span.to - span.from) / 86_400_000 : 0);
// 2
2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.