(atz, pls validate) bugfixing dates viewing on moremember

There were 2 bugs :
- one in moremember.pl that supposed the date value to be in preffered order, which is wrong, it's in iso at this time
- the output does not work as expected, as it always return iso.

Pls atz, confirm Dates.pm was bugged.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2007-11-23 19:26:11 +01:00 committed by Joshua Ferraro
parent 0e7412c802
commit 304deaadf1
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ sub init ($;$$) {
}
sub output ($;$) {
my $self = shift;
my $newformat = (@_) ? _recognize_format(shift) : $self->{'dateformat'} ;
my $newformat = (@_) ? _recognize_format(shift) : $prefformat;
return (eval {POSIX::strftime($posix_map{$newformat}, @self::dmy_array)} || undef);
}
sub today ($;$) { # NOTE: sets date value to today (and returns it in the requested or current format)

View File

@ -96,7 +96,7 @@ my $category_type = $borrowercategory->{'category_type'};
$template->param( $data->{'categorycode'} => 1 );
foreach (qw(dateenrolled dateexpiry dateofbirth)) {
my $tempdate = C4::Dates->new($data->{$_})->output('iso')
my $tempdate = C4::Dates->new($data->{$_},'iso')->output
or warn ("Invalid $_ = " . $data->{$_});
$data->{$_} = $tempdate || '';
}