Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libgedcom-perl
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Perl Group
modules
packages
libgedcom-perl
Commits
fd479ddf
Commit
fd479ddf
authored
8 years ago
by
Niko Tyni
Browse files
Options
Downloads
Patches
Plain Diff
Apply upstream patch fixing test failures with Date::Manip v6.x
Closes: #795206
parent
7307e738
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0001-Make-the-tests-pass-by-ignoring-AFT-in-dates.patch
+36
-0
36 additions, 0 deletions
...s/0001-Make-the-tests-pass-by-ignoring-AFT-in-dates.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
37 additions
and
0 deletions
debian/patches/0001-Make-the-tests-pass-by-ignoring-AFT-in-dates.patch
0 → 100644
+
36
−
0
View file @
fd479ddf
From d350ade3f32275f739ad1878d7ee0dab9831bcdf Mon Sep 17 00:00:00 2001
From: Tudor Constantin <tudorconstantin@gmail.com>
Date: Sun, 3 May 2015 10:16:13 +0300
Subject: [PATCH] Make the tests pass by ignoring AFT in dates
Bug: https://github.com/pjcj/Gedcom.pm/issues/5
Bug-Debian: https://bugs.debian.org/795206
Origin: upstream, https://github.com/pjcj/Gedcom.pm/commit/42eee593494b50f8c21451df5e5f9e96c0dd6411
---
lib/Gedcom/Record.pm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/Gedcom/Record.pm b/lib/Gedcom/Record.pm
index 1ecc84e..769c7d6 100644
--- a/lib/Gedcom/Record.pm
+++ b/lib/Gedcom/Record.pm
@@ -565,7 +565,15 @@
sub normalise_dates
my @dates = split / or /, $self->{value};
for my $dt (@dates)
{
- # don't change the date if it is just < 7 digits
+ # Don't change the date if it looks like 'AFT 1989'.
+ # AFT means AFTER and ParseDate returns the current date and the tests
+ # are failing.
+ # Current date can symbolize such an "after" date, but can also
+ # symbolize a very specific point in time and that could also confuse
+ # the user.
+ next if $dt =~ /^AFT/;
+
+ # Don't change the date if it is just < 7 digits.
if ($dt !~ /^\s*(\d+)\s*$/ || length $1 > 6)
{
my $date = ParseDate($dt);
--
2.9.3
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
fd479ddf
0001-Make-the-tests-pass-by-ignoring-AFT-in-dates.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment