+=head3 checkouts
+
+my $issues = $patron->checkouts
+
+=cut
+
+sub checkouts {
+ my ($self) = @_;
+ my $issues = $self->_result->issues;
+ return Koha::Checkouts->_new_from_dbic( $issues );
+}
+
+=head3 get_overdues
+
+my $overdue_items = $patron->get_overdues
+
+Return the overdued items
+
+=cut
+
+sub get_overdues {
+ my ($self) = @_;
+ my $dtf = Koha::Database->new->schema->storage->datetime_parser;
+ return $self->checkouts->search(
+ {
+ 'me.date_due' => { '<' => $dtf->format_datetime(dt_from_string) },
+ },
+ {
+ prefetch => { item => { biblio => 'biblioitems' } },
+ }
+ );
+}
+
+=head3 get_age
+
+my $age = $patron->get_age
+
+Return the age of the patron
+
+=cut
+
+sub get_age {
+ my ($self) = @_;
+ my $today_str = dt_from_string->strftime("%Y-%m-%d");
+ my $dob_str = dt_from_string( $self->dateofbirth ) || return;
+ $dob_str = $dob_str->strftime("%Y-%m-%d");
+
+ my ( $dob_y, $dob_m, $dob_d ) = split /-/, $dob_str;
+ my ( $today_y, $today_m, $today_d ) = split /-/, $today_str;
+
+ my $age = $today_y - $dob_y;
+ if ( $dob_m . $dob_d > $today_m . $today_d ) {
+ $age--;
+ }
+
+ return $age;
+}
+
+=head3 account
+
+my $account = $patron->account
+
+=cut
+
+sub account {
+ my ($self) = @_;
+ return Koha::Account->new( { patron_id => $self->borrowernumber } );
+}
+
+=head3 holds
+
+my $holds = $patron->holds
+
+Return all the holds placed by this patron
+
+=cut
+
+sub holds {
+ my ($self) = @_;
+ my $holds_rs = $self->_result->reserves->search( {}, { order_by => 'reservedate' } );
+ return Koha::Holds->_new_from_dbic($holds_rs);
+}
+