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