- Run record
- loading
Loading this Run…
Loading the Revisions of this Run…
A published source file of Revision 0 of Boardly — Website Relaunch 1.0.0, shown as text in the browser.
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const MONTHS_LONG = [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December",
];
const WEEKDAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
function parts(iso: string) {
const [y, m, d] = iso.split("-").map(Number);
return { y, m, d, weekday: new Date(Date.UTC(y, m - 1, d)).getUTCDay() };
}
/** "Oct 20" */
export function shortDate(iso: string): string {
const { m, d } = parts(iso);
return `${MONTHS[m - 1]} ${d}`;
}
/** "Tue, Oct 20, 2026" */
export function mediumDate(iso: string): string {
const { y, m, d, weekday } = parts(iso);
return `${WEEKDAYS[weekday]}, ${MONTHS[m - 1]} ${d}, ${y}`;
}
/** "October 20, 2026" — for screen-reader text */
export function longDate(iso: string): string {
const { y, m, d } = parts(iso);
return `${MONTHS_LONG[m - 1]} ${d}, ${y}`;
}
export function daysBetween(fromIso: string, toIso: string): number {
const a = parts(fromIso);
const b = parts(toIso);
return Math.round((Date.UTC(b.y, b.m - 1, b.d) - Date.UTC(a.y, a.m - 1, a.d)) / 86_400_000);
}Source is browser-viewable only. There is no download or archive endpoint, and no additional license is granted beyond inspection and research.