[wp-hackers] Is today a new day?! - is_new_day()

Jeremy Clarke jer at simianuprising.com
Thu May 20 15:05:10 UTC 2010


For anyone who's run into the strangeness around the_date() before its
worth noting that in 3.0 it's logic is broken into two functions:
get_the_date() can be used in the loop to just get the damn date,
while the_date() continues to follow the is_new_day() logic and only
shows once on the first post for that day.

So if you wanted to show the date on every post using the standard
formatting from the Settings > General page (I know, its crazy right?)
you can use

 echo get_the_date()

-- 
Jeremy Clarke | http://jeremyclarke.org
Code and Design | http://globalvoicesonline.org


More information about the wp-hackers mailing list