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

(-)a/Koha/Template/Plugin/KohaDates.pm (-5 / +6 lines)
Lines 28-40 our $DYNAMIC = 1; Link Here
28
sub filter {
28
sub filter {
29
    my ( $self, $text, $args, $config ) = @_;
29
    my ( $self, $text, $args, $config ) = @_;
30
    return "" unless $text;
30
    return "" unless $text;
31
    $config->{with_hours} //= 0;
32
31
33
    my $dt = dt_from_string( $text, 'iso' );
32
    my $dt = dt_from_string( $text, 'iso' );
34
33
35
    return $config->{as_due_date} ?
34
    my $params;
36
        output_pref({ dt => $dt, as_due_date => 1 }) :
35
    $params->{dt}          = $dt;
37
        output_pref({ dt => $dt, dateonly => !$config->{with_hours} });
36
    $params->{dateonly}    = 1 if ( defined $config->{with_hours} && $config->{with_hours} == 0 );
37
    $params->{as_due_date} = 1 unless ( $params->{dateonly} );
38
39
    return output_pref( $params );
38
}
40
}
39
41
40
1;
42
1;
41
- 

Return to bug 13739