Title: Dates displaying weirdly
Last modified: August 19, 2016

---

# Dates displaying weirdly

 *  Resolved [deebeeeff](https://wordpress.org/support/users/deebeeeff/)
 * (@deebeeeff)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/dates-displaying-weirdly/)
 * This is weird. I have four posts that I made on 11/20. One of them is fine, always
   displaying the date. The other three do not.
    I edited the dates to a different
   date, and the display was fine. Then I created a news post today, 12/15, and 
   changed the date to 11/20. Again, it did not display the date.
 * In the following code from the general template, the $day and the $previousday
   are the same on the ones that do NOT display a date.
    So why does this happen,
   and only for 11/20, and how do I fix it?
 * Thanks,
    Dave
 * > function the_date($d=”, $before=”, $after=”, $echo = true) {
   >  global $post,
   > $day, $previousday; //echo $day . “/” . $previousday;
   >  $the_date = ”;
   >  if ( $day != $previousday ) { $the_date .= $before; if ( $
   > d==” ) $the_date .= mysql2date(get_option(‘date_format’), $post->post_date);
   > else $the_date .= mysql2date($d, $post->post_date); $the_date .= $after; $previousday
   > = $day; } //echo $the_date; $the_date = apply_filters(‘the_date’, $the_date,
   > $d, $before, $after); if ( $echo ) echo $the_date; else return $the_date; }

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 5 months ago](https://wordpress.org/support/topic/dates-displaying-weirdly/#post-929568)
 * Simple. You have more than one post on 11/20.
 * [http://codex.wordpress.org/Template_Tags/the_date](http://codex.wordpress.org/Template_Tags/the_date)
 * Pay close attention to the “Special Note”.
 * If you want it to always show the date, use the_time instead.
 *  Thread Starter [deebeeeff](https://wordpress.org/support/users/deebeeeff/)
 * (@deebeeeff)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/dates-displaying-weirdly/#post-929674)
 * Thanks for the quick reply!!!
    Of course, that was it, and this gave me a chance
   to improve the look of my pages as well. Dave

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Dates displaying weirdly’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [deebeeeff](https://wordpress.org/support/users/deebeeeff/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/dates-displaying-weirdly/#post-929674)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
