I always hated how drupal group the post author and the date together in one little print function. So after finding out that I could use get_defined_vars() to find all the variables that are available for me to use to further customize the theme I’m working on.
Anyhow, here are the snippets for custom date.
Custom Date For Node
print format_date($node->created, 'custom', 'M d, Y');
Custom Date For Comment
print format_date($comment->timestamp, 'custom', 'M d, Y');
ps – wrap these around the php openning and closing.
Adam Hegi 6:40 pm on December 1, 2008 Permalink |
Thanks for posting this. You helped me figure out how to write a custom date for Drupal’s Scheduler module. I blogged about it here: http://www.primalmedia.com/blog/how-print-custom-dates-using-contemplate-scheduler, and mentioned your post!
Thanks!
Adam Hegi