From 6e51f6b27dbe2c455056dc9656a95025167ebda9 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 11 Oct 2004 20:24:33 +0000 Subject: [PATCH] * src/DateDisplay.py (_display_gregorian): Prepend month and day with zeros if needed for the ISO format. svn: r3619 --- ChangeLog | 4 ++++ src/DateDisplay.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8dbb39910..80c0fe21d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-10-11 Alex Roitman + * src/DateDisplay.py (_display_gregorian): Prepend month and + day with zeros if needed for the ISO format. + 2004-10-10 Don Allingham * src/DateParser.py: try to detect illegal numerical dates * src/GrampsInMemDB.py: handle null handle diff --git a/src/DateDisplay.py b/src/DateDisplay.py index 22629347a..885f9311b 100644 --- a/src/DateDisplay.py +++ b/src/DateDisplay.py @@ -207,9 +207,9 @@ class DateDisplay: if date_val[1] == 0: value = year else: - value = "%s-%d" % (year,date_val[1]) + value = "%s-%02d" % (year,date_val[1]) else: - value = "%s-%d-%d" % (year,date_val[1],date_val[0]) + value = "%s-%02d-%02d" % (year,date_val[1],date_val[0]) elif self.format == 1: if date_val[0] == 0 and date_val[1] == 0: value = str(date_val[2])