1. Luke Plant
  2. sphinx

Commits

Georg Brandl  committed 85ff83c

#294: do not ignore an explicit ``today`` config value in a LaTeX build.

  • Participants
  • Parent commits cd67597
  • Branches default

Comments (0)

Files changed (2)

File CHANGES

View file
 Release 0.6.4 (in development)
 ==============================
 
+* #294: do not ignore an explicit ``today`` config value in a
+  LaTeX build.
+
 * The ``alt`` text of inheritance diagrams is now much cleaner.
 
 * Ignore images in section titles when generating link captions.

File sphinx/writers/latex.py

View file
             'pointsize':    builder.config.latex_font_size,
             # if empty, the title is set to the first section title
             'title':        document.settings.title,
-            'date':         ustrftime(builder.config.today_fmt
-                                      or _('%B %d, %Y')),
             'release':      builder.config.release,
             'author':       document.settings.author,
             'releasename':  _('Release'),
             'modindexname': _('Module Index'),
             'indexname':    _('Index'),
         })
+        if builder.config.today:
+            self.elements['date'] = builder.config.today
+        else:
+            self.elements['date'] = ustrftime(builder.config.today_fmt
+                                              or _('%B %d, %Y'))
         if builder.config.latex_logo:
             self.elements['logo'] = '\\includegraphics{%s}\\par' % \
                                     path.basename(builder.config.latex_logo)