Bug 21829: Correctly format dateexpiry in notices (date only)
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 14 Nov 2018 12:38:01 +0000 (09:38 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 22 Feb 2019 08:12:58 +0000 (09:12 +0100)
dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b160af2a051dc3693f04dabf320d0995cf26160)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ecb86a84c13e4e5661f4c6683b7755c21d607bbe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5493a99486b4c3398f440d36c417d62e315fd5eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

C4/Letters.pm

index 3eacdbe..1c744d0 100644 (file)
@@ -880,7 +880,7 @@ sub _parseletter {
     my $values = $values_in ? { %$values_in } : {};
 
     if ( $table eq 'borrowers' && $values->{'dateexpiry'} ){
-        $values->{'dateexpiry'} = format_sqldatetime( $values->{'dateexpiry'} );
+        $values->{'dateexpiry'} = output_pref({ dt => dt_from_string( $values->{'dateexpiry'} ), dateonly => 1 });
     }
 
     if ( $table eq 'reserves' && $values->{'waitingdate'} ) {