From d7fcad6e4a11a26cb42de4444816f2183fd45e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 29 Sep 2015 18:14:30 +0200 Subject: [PATCH] [SIGNED-OFF]Bug 14925 - Remove C4::Dates from members/moremember.pl This patch removes C4::Dates from members/moremember.pl To test: - Go to Details page of several members - Verify that all dates display OK, including restrictions Signed-off-by: Hector Castro Works as advertised. All dates displayed OK --- members/moremember.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 309efe6..d7932de 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -42,7 +42,6 @@ use C4::Output; use C4::Members; use C4::Members::Attributes; use C4::Members::AttributeTypes; -use C4::Dates; use C4::Reserves; use C4::Circulation; use C4::Koha; @@ -136,7 +135,7 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { $data->{$_} = ''; next; } - $userdate = C4::Dates->new($userdate,'iso')->output('syspref'); + $userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); $data->{$_} = $userdate || ''; $template->param( $_ => $userdate ); } @@ -150,7 +149,7 @@ if ( IsDebarred($borrowernumber) ) { $template->param( 'userdebarred' => 1, 'flagged' => 1 ); my $debar = $data->{'debarred'}; if ( $debar ne "9999-12-31" ) { - $template->param( 'userdebarreddate' => C4::Dates::format_date($debar) ); + $template->param( 'userdebarreddate' => output_pref( { dt => dt_from_string( $debar ), dateonly => 1 } ) ); $template->param( 'debarredcomment' => $data->{debarredcomment} ); } } @@ -344,7 +343,7 @@ $template->param( categoryname => $data->{'description'}, was_renewed => $input->param('was_renewed') ? 1 : 0, branch => $branch, - todaysdate => C4::Dates->today(), + todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), totalprice => sprintf("%.2f", $totalprice), totaldue => sprintf("%.2f", $total), totaldue_raw => $total, -- 1.7.10.4