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 146-152 foreach (qw(dateenrolled dateexpiry dateofbirth)) { Link Here
146
        $data->{$_} = '';
146
        $data->{$_} = '';
147
        next;
147
        next;
148
    }
148
    }
149
    $template->param( $_ => dt_from_string( $userdate ) );
149
    $data->{$_} = dt_from_string( $userdate );
150
}
150
}
151
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' );
151
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' );
152
152
153
- 

Return to bug 17933