By aflores3 on
I am putting together a site for my daughter... she's at that age where everything she says is utterly hilarious, so I'd like to document some of it so she can see it when she's older.
What I am looking to do is have my posted date formatted to show her age. For instance, instead of showing "Posted: Thu, 2010-07-01 18:10" I would like it to say "Age: 4 years, 9 months, 18 days"
Any ideas?
Comments
Override the
Override the theme_node_submitted function in your theme's template.php file... something along the lines of:
where date1 is your daughter's birth date.
Totally unrelated question
This is a wonderful little mod.
My question is, when I override the template.php file, how do I avoid losing the mod when I update the theme?
Do I create something like a local.template.php, or do I just reedit the file after the update?
If you're doing this on a
If you're doing this on a large scale where you need to track such changes across multiple sites, you probably use something like Subversion's vendor branching capabilities. If you're doing this for your daughter's blog, you just re-edit the file after the update.
Bill, This worked like a
Bill,
This worked like a charm. Thanks for the quick response.
Michael,
I don't have an answer for you right off the top, but I'll research it and try to reply to this thread as I will obviously need this functionality too.