- my ($self,$text) = @_;
- my $date = C4::Dates->new( $text, 'iso' );
- return $date->output("syspref");
+ my ( $self, $text, $args, $config ) = @_;
+ return "" unless $text;
+ $config->{with_hours} //= 0;
+ my $dt = dt_from_string( $text, 'iso' );
+ return output_pref({ dt => $dt, dateonly => !$config->{with_hours} });