View | Details | Raw Unified | Return to bug 17933
Collapse All | Expand All

(-)a/Koha/Patron.pm (-1 / +2 lines)
Lines 544-550 Return the age of the patron Link Here
544
sub get_age {
544
sub get_age {
545
    my ($self)    = @_;
545
    my ($self)    = @_;
546
    my $today_str = dt_from_string->strftime("%Y-%m-%d");
546
    my $today_str = dt_from_string->strftime("%Y-%m-%d");
547
    my $dob_str   = dt_from_string( $self->dateofbirth )->strftime("%Y-%m-%d");
547
    my $dob_str   = dt_from_string( $self->dateofbirth ) || return;
548
    $dob_str      = $dob_str->strftime("%Y-%m-%d");
548
549
549
    my ( $dob_y,   $dob_m,   $dob_d )   = split /-/, $dob_str;
550
    my ( $dob_y,   $dob_m,   $dob_d )   = split /-/, $dob_str;
550
    my ( $today_y, $today_m, $today_d ) = split /-/, $today_str;
551
    my ( $today_y, $today_m, $today_d ) = split /-/, $today_str;
(-)a/members/moremember.pl (-2 / +1 lines)
Lines 140-146 foreach (qw(dateenrolled dateexpiry dateofbirth)) { Link Here
140
        $data->{$_} = '';
140
        $data->{$_} = '';
141
        next;
141
        next;
142
    }
142
    }
143
    $template->param( $_ => dt_from_string( $userdate ) );
143
    $data->{$_} = dt_from_string( $userdate );
144
}
144
}
145
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' );
145
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' );
146
146
147
- 

Return to bug 17933