{#if data.current}

Last API update: {millisecondsToTime(currentTime - data.lastUpdated, { smallestUnit: 1, parts: 3, })} ago

{/if}

SkyBlock Mayor Election Status

Next election: {millisecondsToTime(skyblockTime(data.previous.year + 1, 6, 27) - currentTime, { parts: 3, smallestUnit: 1, })}

{#if data.current}

Ongoing election (Year {data.current.year})

Ends in: {millisecondsToTime(skyblockTime(data.previous.year + 1, 3, 27) - currentTime)}

{#each data.current.candidates.sort((a, b) => a.votes - b.votes) as candidate} {@const color = candidate.color ? colorCodes[candidate.color] : null}

{candidate.name}

{candidate.votes.toLocaleString()} votes

    {#each candidate.perks as perk}

    {perk.name}

    {@html formattingCodeToHtml(perk.description)}

    {/each}
{/each}
{/if}

Previous election (Year {data.previous.year})

{#each data.previous.candidates.sort((a, b) => b.votes - a.votes) as candidate} {@const color = candidate.color ? colorCodes[candidate.color] : null}

{candidate.name}

{candidate.votes.toLocaleString()} votes

{#if candidate.name == data.previous.winner}

Winner

{/if}
    {#each candidate.perks as perk}

    {perk.name}

    {@html formattingCodeToHtml(perk.description)}

    {/each}
{/each}

Upcoming special mayors