diff --git src/wp-includes/rewrite.php src/wp-includes/rewrite.php
index 984fbbe..d696325 100644
--- src/wp-includes/rewrite.php
+++ src/wp-includes/rewrite.php
@@ -895,10 +895,10 @@ class WP_Rewrite {
 	 * one is used. If none matches, then the default will be used, which is
 	 * year, month, day.
 	 *
-	 * Prevents post ID and date permalinks from overlapping. In the case of
-	 * post_id, the date permalink will be prepended with front permalink with
-	 * 'date/' before the actual permalink to form the complete date permalink
-	 * structure.
+	 * Prevents post ID or slug and date permalinks from overlapping. In the case of
+	 * post_id or a postname only structure, the date permalink will be prepended 
+	 * with front permalink and 'date/' before the actual permalink to form the 
+	 * complete date permalink structure.
 	 *
 	 * @since 1.5.0
 	 * @access public
@@ -930,13 +930,15 @@ class WP_Rewrite {
 		if ( empty($date_endian) )
 			$date_endian = '%year%/%monthnum%/%day%';
 
-		// Do not allow the date tags and %post_id% to overlap in the permalink
-		// structure. If they do, move the date tags to $front/date/.
+		/*
+		 * Do not allow the date tags and %post_id% or %postname% to overlap in the 
+		 * permalink structure. If they do, move the date tags to $front/date/.
+		 */
 		$front = $this->front;
 		preg_match_all('/%.+?%/', $this->permalink_structure, $tokens);
 		$tok_index = 1;
 		foreach ( (array) $tokens[0] as $token) {
-			if ( '%post_id%' == $token && ($tok_index <= 3) ) {
+			if ( in_array( $token, array( '%post_id%', '%postname%' ) ) && $tok_index <= 3 ) {
 				$front = $front . 'date/';
 				break;
 			}
diff --git tests/phpunit/tests/post.php tests/phpunit/tests/post.php
index ae549e0..2c294a2 100644
--- tests/phpunit/tests/post.php
+++ tests/phpunit/tests/post.php
@@ -470,6 +470,28 @@ class Tests_Post extends WP_UnitTestCase {
 	}
 
 	/**
+	 * @ticket 5305
+	 */
+	function test_permalink_with_date_collision() {
+		global $wp_rewrite;
+		$wp_rewrite->init();
+		$wp_rewrite->set_permalink_structure( '/archive/%postname%/' );
+		$wp_rewrite->flush_rules();
+
+		$id = $this->factory->post->create( array(
+			'post_author'  => $this->author_id,
+			'post_status'  => 'publish',
+			'post_content' => rand_str(),
+			'post_title'   => '2015',
+			'post_date'    => '2015-02-01 01:00:00',
+		) );
+
+		$this->assertEquals( $id, url_to_postid( get_permalink( $id ) ) );
+
+		$wp_rewrite->set_permalink_structure('');
+	}
+
+	/**
 	 * @ticket 21013
 	 */
 	function test_wp_unique_post_slug_with_non_latin_slugs() {
