Changeset 64a3db7 in rtems-docs


Ignore:
Timestamp:
Nov 3, 2016, 3:41:39 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, 5, am, master
Children:
d3226d3
Parents:
040b703
Message:

conf: Make the build date use a nicer day format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/conf.py

    r040b703 r64a3db7  
    44
    55import datetime
     6
     7def build_date():
     8    now = datetime.date.today()
     9    m = now.strftime('%b')
     10    y = now.strftime('%Y')
     11    if now.day % 10 == 1:
     12        s = 'st'
     13    elif now.day % 10 == 2:
     14        s = 'nd'
     15    elif now.day == 3:
     16        s = 'rd'
     17    else:
     18        s = 'th'
     19    d = '%2d%s' % (now.day, s)
     20    return '%s %s %s' % (d, m, y)
    621
    722extensions = [
     
    3045# General information about the project.
    3146project = u'RTEMS Documentation Project'
    32 copyright = u'2016, RTEMS Project (built %s)' % (datetime.date.today().strftime('%d %b %Y'))
     47copyright = u'2016, RTEMS Project (built %s)' % (build_date())
    3348
    3449# The version info for the project you're documenting, acts as replacement for
Note: See TracChangeset for help on using the changeset viewer.