[release_table] Improve script for Debian (#315)

- add an 'ignore_empty_releases' to exclude empty releases (which are future releases for Debian),
- improve logging,
- add the 'YYYY-mm' month_year date format.
This commit is contained in:
Marc Wrobel
2024-02-19 22:12:25 +01:00
parent 56ca896a38
commit c968456d3d
3 changed files with 25 additions and 9 deletions

View File

@@ -20,6 +20,7 @@ def parse_date(text: str, formats: list[str] = frozenset([
def parse_month_year_date(text: str, formats: list[str] = frozenset([
"%B %Y", # January 2020
"%b %Y", # Jan 2020
"%Y-%m", # 2020-01
])) -> datetime:
"""Parse a given text representing a partial date using a list of formats,
adjusting it to the last day of the month.