After the big push yesterday I only had a small amount of time on the project today. So mainly small stuff.

I decided I wanted to have the posts show the day of the project on which they were posted. I think it feels more dramatic to know that this is say ‘Day 26’ of the project than to know it is 23rd Jan 2006 (which incidently is election day in Canada.) To achieve this, I downloaded a plugin called datediff and then used the following magic incantation in the post.php file of my theme

datediff("2005-12-28", get_the_time('Y-m-j'),"d");

inside a php tag. This means my project started on 28th Dec 2005 and that datediff is returning the number of days between then and the date of the post. Note the minor subtlety of using the get_the_time function and not the the_time function. The the_time function will place the post date in the HTML whereas get_the_time does not but just passes it to the datediff function as a String. Minor difference but one works and the other doesn’t!