From 9f1d798bfe33c4b8e72e61d589ca5ee4b275d34c Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Thu, 20 Dec 2007 19:38:47 -0600 Subject: [PATCH] import_borrowers.pl - convert dates BEFORE AddMember or ModMember Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- tools/import_borrowers.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index ae03c5202c..30200d4fae 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -36,7 +36,7 @@ use strict; use C4::Auth; use C4::Output; -use C4::Dates; +use C4::Dates qw(format_date_in_iso); use C4::Context; use C4::Members; @@ -88,6 +88,10 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { my %borrower; if ( @columns == @columnkeys ) { @borrower{@columnkeys} = @columns; + foreach (qw(dateofbirth dateenrolled dateexpiry)) { + my $tempdate = $borrower{$_} or next; + $borrower{$_} = format_date_in_iso($tempdate) || ''; + } if ( my $member = GetMember( $borrower{'cardnumber'}, 'cardnumber' ) ) { -- 2.39.5