Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The <chikyu-earth-realistic> element

readTimefunction

A time attribute: "now" (or none) follows the clock, else an ISO date such as 2026-06-21T12:00:00Z.

Import it

import { readTime } from "@johnmorrisdotca/chikyu-earth/realistic/element";

Definition

function readTime(value: string | null): number | "now"

Parameters

NameTypeDescription
valuestring | null

The attribute's text, or null when it is not there.

Returns

number | "now"

The moment in milliseconds since the Unix epoch, or "now" when the value is empty, "now" or not a date.

Examples

import { readTime } from "@johnmorrisdotca/chikyu-earth/realistic/element";

console.log(readTime("2026-06-21T12:00:00Z"), readTime(null), readTime("tomorrow"));

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.11.0.