get_results("SELECT YEAR(post_date_gmt) AS year FROM $wpdb->posts WHERE post_date_gmt > 1970 ORDER BY post_date_gmt ASC");
$firstpost_year = $post_datetimes[0]->year;
$lastpost_year = $post_datetimes[count($post_datetimes)-1]->year;
$copyright = __('Copyright © ', 'blocks2') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
echo $copyright;
?>