ops: dates shown as DD.MM.YYYY (bot, digest, reminders, BroV)

Storage and the API stay ISO; ru_day() formats every user-facing date, Claude is asked
to write dates in its replies the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-10 03:21:24 +03:00
parent 549f8d046d
commit e47b97a462
5 changed files with 33 additions and 14 deletions
+10
View File
@@ -28,6 +28,16 @@ def add_period(d: date, period: str, every: int = 1) -> date:
raise OpsError(f"неизвестный период: {period}")
def ru_day(iso) -> str:
"""2026-11-15 → 15.11.2026 (how dates are shown; storage stays ISO)."""
if not iso:
return ""
try:
return date.fromisoformat(str(iso)[:10]).strftime("%d.%m.%Y")
except ValueError:
return str(iso)
def parse_day(s) -> date | None:
if s in (None, ""):
return None