From 1915b35ba9cc68015feaae9d9db56b98e36eca9f Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 27 Sep 2004 03:16:48 +0000 Subject: [PATCH] * src/DateDisplay: don't rely on strftime, since it does not handle dates before 1900 svn: r3576 --- gramps2/ChangeLog | 4 ++++ gramps2/Makefile.am | 3 +++ gramps2/configure.in | 4 ++-- gramps2/src/DateDisplay.py | 7 ++++--- gramps2/src/Makefile.am | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 48ea4b9de..be9c9b0db 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2004-09-26 Don Allingham + * src/DateDisplay: don't rely on strftime, since it does not + handle dates before 1900 + 2004-09-25 Don Allingham * src/DateDisplay.py: add set_format function * src/GrampsCfg.py: update RelLib display diff --git a/gramps2/Makefile.am b/gramps2/Makefile.am index ebd6aa3d7..076683e59 100644 --- a/gramps2/Makefile.am +++ b/gramps2/Makefile.am @@ -14,4 +14,7 @@ pycheck: trans: (cd src; make trans) +distuninstallcheck: + @: + CLEANFILES = gramps diff --git a/gramps2/configure.in b/gramps2/configure.in index 88aeb23bb..75cfe74bf 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -7,8 +7,8 @@ AC_PREREQ(2.57) AC_INIT(gramps, 1.1.1, gramps-bugs@lists.sourceforge.net) AC_CONFIG_SRCDIR(src/gramps.py) AM_INIT_AUTOMAKE(1.6.3) -RELEASE=0.CVS$(head -c 10 ${srcdir}/ChangeLog | tr -d '-') -dnl RELEASE=1 +dnl RELEASE=0.CVS$(head -c 10 ${srcdir}/ChangeLog | tr -d '-') +RELEASE=1 VERSIONSTRING=$VERSION if test x"$RELEASE" != "x" diff --git a/gramps2/src/DateDisplay.py b/gramps2/src/DateDisplay.py index 792aa10fd..95d6ff5c4 100644 --- a/gramps2/src/DateDisplay.py +++ b/gramps2/src/DateDisplay.py @@ -90,7 +90,7 @@ class DateDisplay: unicode(locale.nl_langinfo(locale.ABMON_12),_codeset).upper(), ) - _tformat = locale.nl_langinfo(locale.D_FMT) + _tformat = locale.nl_langinfo(locale.D_FMT).replace('%y','%Y') _hebrew = ( "", "Tishri", "Heshvan", "Kislev", "Tevet", "Shevat", @@ -213,8 +213,9 @@ class DateDisplay: if date_val[0] == 0 and date_val[1] == 0: return str(date_val[2]) else: - return time.strftime(self._tformat,(date_val[2],date_val[1], - date_val[0],0,0,0,0,0,0)) + val = self._tformat.replace('%m',str(date_val[1])) + val = val.replace('%d',str(date_val[0])) + return val.replace('%Y',str(date_val[2])) elif self.format == 2: # Month Day, Year if date_val[0] == 0: diff --git a/gramps2/src/Makefile.am b/gramps2/src/Makefile.am index 1bad95b84..cc03ec239 100644 --- a/gramps2/src/Makefile.am +++ b/gramps2/src/Makefile.am @@ -98,7 +98,7 @@ gdir_PYTHON = \ SelectPerson.py\ ArgHandler.py\ Exporter.py\ - GrampsGconfKeys + GrampsGconfKeys.py # Could use GNU make's ':=' syntax for nice wildcard use. # If not using GNU make, then list all files individually