Lines 638-643
sub _parseletter {
Link Here
|
638 |
#but excludes items. Removed unneeded global and lookahead. |
638 |
#but excludes items. Removed unneeded global and lookahead. |
639 |
|
639 |
|
640 |
my $replacedby = defined ($val) ? $val : ''; |
640 |
my $replacedby = defined ($val) ? $val : ''; |
|
|
641 |
if ( $replacedby and $replacedby =~ m|^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?$| ) { |
642 |
# If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date |
643 |
my $dateonly = defined $1 ? 1 : 0; |
644 |
eval { |
645 |
$replacedby = output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly }); |
646 |
}; |
647 |
warn "$replacedby seems to be a date but an error occurs on generating it ($@)" if $@; |
648 |
} |
641 |
($letter->{title} ) and do { |
649 |
($letter->{title} ) and do { |
642 |
$letter->{title} =~ s/$replacetablefield/$replacedby/g; |
650 |
$letter->{title} =~ s/$replacetablefield/$replacedby/g; |
643 |
$letter->{title} =~ s/$replacefield/$replacedby/g; |
651 |
$letter->{title} =~ s/$replacefield/$replacedby/g; |
644 |
- |
|
|