Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
export function getDayName(date?: Date) {
return (date ?? new Date()).toLocaleDateString("en-US", { weekday: "long" });
}
October 23, 2023