line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gedcom::Date::Interpreted; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
27
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
163
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
26
|
use vars qw($VERSION @ISA); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
427
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
8
|
|
|
|
|
|
|
@ISA = qw/Gedcom::Date/; |
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
29
|
use Gedcom::Date; |
|
6
|
|
|
|
|
25
|
|
|
6
|
|
|
|
|
2165
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
23
|
|
|
23
|
1
|
36
|
my $class = shift; |
14
|
23
|
|
|
|
|
36
|
my ($str) = @_; |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
225
|
my ($date, $phrase) = $str =~ /^INT (.*?) \((.*)\)$/ |
17
|
|
|
|
|
|
|
or return; |
18
|
|
|
|
|
|
|
|
19
|
3
|
50
|
|
|
|
16
|
my $date_s = Gedcom::Date::Simple->parse($date) |
20
|
|
|
|
|
|
|
or return; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
13
|
my $self = bless { |
23
|
|
|
|
|
|
|
date => $date_s, |
24
|
|
|
|
|
|
|
phrase => $phrase |
25
|
|
|
|
|
|
|
}, $class; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
184
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub gedcom { |
31
|
2
|
|
|
2
|
1
|
473
|
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
|
|
|
|
|
12
|
$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
|
6
|
my ($self, $lang) = @_; |
65
|
|
|
|
|
|
|
|
66
|
3
|
|
|
|
|
12
|
return ($text{$lang}, $self->{date}); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |