feat: improve format_date with fallback value

This commit is contained in:
Matthias
2025-12-02 07:12:32 +01:00
parent 0f5427f4a0
commit 9c73c8671e
2 changed files with 4 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ def test_format_date() -> None:
date = datetime(2021, 9, 30, 22, 59, 3, 455555, tzinfo=UTC)
assert format_date(date) == "2021-09-30 22:59:03"
assert format_date(None) == ""
assert format_date(None, "closed") == "closed"
def test_format_ms_time_detailed() -> None: