line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gedcom::Date::Interpreted; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
38
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
254
|
|
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
36
|
use vars qw($VERSION @ISA); |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
474
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
8
|
|
|
|
|
|
|
@ISA = qw/Gedcom::Date/; |
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
7
|
|
35
|
use Gedcom::Date; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
2699
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
23
|
|
|
23
|
1
|
36
|
my $class = shift; |
14
|
23
|
|
|
|
|
39
|
my ($str) = @_; |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
245
|
my ($date, $phrase) = $str =~ /^INT (.*?) \((.*)\)$/ |
17
|
|
|
|
|
|
|
or return; |
18
|
|
|
|
|
|
|
|
19
|
3
|
50
|
|
|
|
15
|
my $date_s = Gedcom::Date::Simple->parse($date) |
20
|
|
|
|
|
|
|
or return; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
20
|
my $self = bless { |
23
|
|
|
|
|
|
|
date => $date_s, |
24
|
|
|
|
|
|
|
phrase => $phrase |
25
|
|
|
|
|
|
|
}, $class; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
226
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub gedcom { |
31
|
2
|
|
|
2
|
1
|
522
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
2
|
50
|
|
|
|
10
|
if (!defined $self->{gedcom}) { |
34
|
2
|
|
|
|
|
10
|
$self->{gedcom} = 'INT '.$self->{date}->gedcom(). |
35
|
|
|
|
|
|
|
" ($self->{phrase})"; |
36
|
|
|
|
|
|
|
} |
37
|
2
|
|
|
|
|
10
|
$self->{gedcom}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub latest { |
41
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
0
|
return $self->{date}->latest; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub earliest { |
47
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
0
|
return $self->{date}->earliest; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub sort_date { |
53
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
0
|
return $self->{date}->sort_date; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my %text = ( |
59
|
|
|
|
|
|
|
en => 'on %0', |
60
|
|
|
|
|
|
|
nl => 'op %0', |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub text_format { |
64
|
3
|
|
|
3
|
0
|
8
|
my ($self, $lang) = @_; |
65
|
|
|
|
|
|
|
|
66
|
3
|
|
|
|
|
16
|
return ($text{$lang}, $self->{date}); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |