click_extra.sphinx.announcement module¶
Count the years an announcement banner claims, like “maintained for 5+ years”.
A figure written by hand in conf.py goes stale on the next anniversary.
years_since() computes it again on each build, so the banner of a site
published from CI stays current.
- click_extra.sphinx.announcement.years_since(start, *, today=None)[source]¶
Return the whole years from
starttotoday.The count goes up on each anniversary of
start, never before it. A count of days divided by 365 would run a day ahead for each leap day in between. Astarton 29 February has its anniversary on 1 March of a common year.