Fix so that date, if any, in source reference is printed.

svn: r17731
This commit is contained in:
Peter Landgren
2011-06-09 14:10:20 +00:00
parent d7200b028a
commit 3eea6dc8dc
2 changed files with 12 additions and 2 deletions

View File

@@ -129,7 +129,17 @@ def write_endnotes(bibliography, database, doc, printnotes=False):
first = True
reflines = ""
for key, ref in ref_list:
txt = "%s: %s" % (key, ref.get_page())
datepresent = False
date = ref.get_date_object()
if date is not None and not date.is_empty():
datepresent = True
if datepresent:
if ref.get_page():
txt = "%s: %s - %s" % (key, ref.get_page(), str(date))
else:
txt = "%s: %s" % (key, str(date))
else:
txt = "%s: %s" % (key, ref.get_page())
if first:
reflines += txt
first = False