?> <p><?php total_books(); ?> overall; <?php books_read_since('1 year'); ?> read in the last year; <?php books_read_since('1 month'); ?> <?php __('read in the last month. That\'s', NRTD); ?> <?php average_books('month'); ?> .</p> <?php library_search_form(); ?> <h2>Planned books (<?php echo total_books('unread', 0); ?> ):</h2> <?php if (have_books('status=unread&num=-1')) { ?>
/** * Prints book reading statistics. * @param string $time_period The period to measure average over, eg "year", "month". */ function print_book_average($time_period = 'year') { echo "There are "; total_books(0); echo " listed, of which "; books_read_since('1 year'); echo " have been read in the last year, "; books_read_since('1 month'); echo " read in the last month. That's "; average_books($time_period, true, false); echo "."; }