from __future__ import annotations

from .clock import group_date_ymd


def next_group_id(existing_count: int, now=None) -> str:
    ymd = group_date_ymd(now)
    n = int(existing_count) + 1
    return f"G-{ymd}-{n:02d}"
