mirror of
https://git.rtems.org/rtems-docs/
synced 2025-05-17 05:21:41 +08:00
conf: Make the build date use a nicer day format.
This commit is contained in:
parent
040b703c14
commit
64a3db7073
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user