addTimefunction
Add a time to the ones getTimes gives: when the Sun reaches an altitude in degrees, going up under the morning name and going down under the evening name.
Import it
import { addTime } from "@johnmorrisdotca/wakusei-planets/suncalc";
Definition
function addTime(angle: number, riseName: string, setName: string): void
Parameters
| Name | Type | Description |
|---|---|---|
angle | number | The altitude in degrees. |
riseName | string | The name of the time when the Sun goes up through it. |
setName | string | The name of the time when the Sun goes down through it. |
Examples
import { addTime, times } from "@johnmorrisdotca/wakusei-planets/suncalc";
addTime(-4, "morningBlueHourEnd", "blueHour");
console.log(times.some((row) => row[2] === "blueHour"));trueWhat it prints (run when this page was built)