Skip to content

Commit d88bb0b

Browse files
committed
Set year from execution date
Set the date (year) of the copyright notice to be the current year at the time the documentation is generated.
1 parent d85e071 commit d88bb0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import subprocess
2424
import sys
2525
import urllib.parse
26+
import time
2627

2728
import recommonmark
2829
from sphinx.transforms import SphinxTransform
@@ -101,9 +102,12 @@
101102
# The master toctree document.
102103
#master_doc = 'index'
103104

105+
# Get current date (execution) for copyright year
106+
current_date = time.localtime()
107+
104108
# General information about the project.
105109
project = 'Adafruit CircuitPython'
106-
copyright = '2014-2021, MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)'
110+
copyright = f'2014-{current_date.tm_year}, MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)'
107111

108112
# These are overwritten on ReadTheDocs.
109113
# The version info for the project you're documenting, acts as replacement for

0 commit comments

Comments
 (0)