(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:
parent
0e7412c802
commit
304deaadf1
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 || '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue