{#if !calendars.length}

A calendar is what you download into Apple or Google Calendar: one per child, or one for the family.

Add a calendar
{:else}

Add to your phone's calendar

On iPhone, open the file and tap “Add All”. Each download holds only what changed since the last one, so nothing is duplicated.

{#if lastDownload}

Last download {lastDownload.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })}

{/if}

{monthLabel(month)}

{#if editing === 'new'}

New event

(editing = null)} />
{/if} {#if error} {:else if events === null}
{#each [1, 2, 3] as _}
{/each}
{:else if view === 'grid'} {:else if !events.length}

Publish a scan, or add an event by hand.

{:else}
    {#each byDay as [day, list] (day)} {@const d = parse(day)} {@const isToday = day === today}
  1. {#if isToday}Today{/if}
      {#each list as e (e.id)} {@const KindIcon = KIND_ICONS[e.kind]}
    • {#if isOpen(e, day)} (editing = null)} ondelete={remove(e.id)} /> {/if}
    • {/each}
  2. {/each}
{/if}
{/if}