summaryrefslogtreecommitdiffstats
path: root/common/conf.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-11-03 14:41:39 +1100
committerChris Johns <chrisj@rtems.org>2016-11-03 14:41:39 +1100
commit64a3db70736a3e8bb2a7f73440b93473725d6616 (patch)
treea855de217ac3a2af889ba4af914646ab9d67d7b6 /common/conf.py
parent040b703c14b01d1dd33766c134d80780964996f9 (diff)
downloadrtems-docs-64a3db70736a3e8bb2a7f73440b93473725d6616.tar.bz2
conf: Make the build date use a nicer day format.
Diffstat (limited to 'common/conf.py')
-rw-r--r--common/conf.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/common/conf.py b/common/conf.py
index 0587753..d3d8bb0 100644
--- a/common/conf.py
+++ b/common/conf.py
@@ -4,6 +4,21 @@
import datetime
+def build_date():
+ now = datetime.date.today()
+ m = now.strftime('%b')
+ y = now.strftime('%Y')
+ if now.day % 10 == 1:
+ s = 'st'
+ elif now.day % 10 == 2:
+ s = 'nd'
+ elif now.day == 3:
+ s = 'rd'
+ else:
+ s = 'th'
+ d = '%2d%s' % (now.day, s)
+ return '%s %s %s' % (d, m, y)
+
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
@@ -29,7 +44,7 @@ master_doc = 'index'
# General information about the project.
project = u'RTEMS Documentation Project'
-copyright = u'2016, RTEMS Project (built %s)' % (datetime.date.today().strftime('%d %b %Y'))
+copyright = u'2016, RTEMS Project (built %s)' % (build_date())
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the