Public
Edited
Dec 20, 2023
4 stars
Insert cell
Insert cell
Insert cell
{
if (new Date().getDay() === 1 /* Monday */) {
return (await NotificationClient("email:you@example.com")).send("Happy Monday!")
}
}
Insert cell
Insert cell
{
if (new Date().getDate() === 15) {
return (await NotificationClient("email:you@example.com")).send("Happy ides!")
}
}
Insert cell
Insert cell
n = 2
Insert cell
{
if (
d3
.utcMondays(d3.utcYear.floor(new Date()), d3.utcYear.ceil(new Date()), n)
.find((d) => +d === +d3.utcDay.floor(new Date()))
) {
return (await NotificationClient("email:you@example.com")).send(`Happy ${n}th Monday!`);
}
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more