1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { fetch } from "https://esm.town/v/std/fetch";
export async function keriatShemaReminser() {
const today = new Date().toISOString().split("T")[0];
const city = "IL-Jerusalem";
const { times } = await (
await fetch(
`https://www.hebcal.com/zmanim?cfg=json&city=${city}&date=${today}`
)
).json();
const sofZmanKeriatShema = times.sofZmanShma;
const timeInDay = new Date(sofZmanKeriatShema).toLocaleTimeString("en", {
timeStyle: "short",
hour12: false,
});
console.email(timeInDay);
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.