View | Details | Raw Unified | Return to bug 11244
Collapse All | Expand All

(-)a/C4/Letters.pm (-2 / +1 lines)
Lines 640-646 sub _parseletter { Link Here
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})?$| ) {
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
642
            # If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date
643
            my $dateonly = defined $1 ? 1 : 0;
643
            my $dateonly = defined $1 ? 0 : 1; #$1 refers to the capture group wrapped in parentheses. In this case, that's the hours, minutes, seconds.
644
            eval {
644
            eval {
645
                $replacedby = output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly });
645
                $replacedby = output_pref({ dt => dt_from_string( $replacedby ), dateonly => $dateonly });
646
            };
646
            };
647
- 

Return to bug 11244