From e84bf70347a57fad99c533485b538cea50c1aa0d Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 24 Nov 2014 17:15:01 -0800 Subject: [PATCH] ignore a zero day and its delimiter, in numerical date format --- gramps/gen/datehandler/_datedisplay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/gen/datehandler/_datedisplay.py b/gramps/gen/datehandler/_datedisplay.py index 97aa192cf..d57cd9850 100644 --- a/gramps/gen/datehandler/_datedisplay.py +++ b/gramps/gen/datehandler/_datedisplay.py @@ -455,6 +455,9 @@ class DateDisplay(object): return str(date_val[2]) else: value = self._tformat.replace('%m', str(date_val[1])) + if date_val[0] == 0: # ignore the zero day and its delimiter + i_day = value.find('%d') + value = value.replace(value[i_day:i_day+3], '') value = value.replace('%d', str(date_val[0])) value = value.replace('%Y', str(abs(date_val[2]))) return value.replace('-', '/')