Milestone v1.0: FamilySync MVP #1

Merged
luckberg merged 376 commits from gsd/v1.0-milestone into main 2026-06-10 17:39:19 -04:00
Showing only changes of commit d34edece96 - Show all commits
+5 -2
View File
@@ -108,9 +108,12 @@ function parseDateTime(iso: string): { date: string; time: string } {
try {
// Strip IANA bracket suffix e.g. '[America/Toronto]'
const clean = iso.replace(/\[[^\]]*\]$/, '')
if (/^\d{4}-\d{2}-\d{2}$/.test(iso)) {
// WR-03: test and return `clean`, not the raw `iso`. Testing `iso` would let a
// date-only value carrying a bracket suffix skip the all-day branch and fall through
// to new Date(clean); using `clean` matches the "strip IANA suffix" intent above.
if (/^\d{4}-\d{2}-\d{2}$/.test(clean)) {
// All-day date string — use as-is (no time component)
return { date: iso, time: '09:00' }
return { date: clean, time: '09:00' }
}
const d = new Date(clean)
if (isNaN(d.getTime())) throw new Error('Invalid date')