Use get_the_date instead of the_date because Wordpress won't return a date if 2 posts are from the same day. insane.