amplegest / dashboard /__init__.py
Viney's picture
deploy: Primer app for HF Spaces β€” clean orphan history
35676b4
Raw
History Blame Contribute Delete
225 Bytes
def fmt_period(p: str) -> str:
"""Convert stored period 'Q32023' β†’ display '3Q2023'. FY periods unchanged."""
if p and len(p) >= 6 and p[0] == "Q" and p[1] in "1234":
return p[1] + p[0] + p[2:]
return p