Blog / Date format on our blog

Just had a question about the date format on our blogs, so thought I'd share with everyone. Not sure if our developer (no longer with us) borrowed the technique from another source, but if she did then kudos to the other source.

A code snippet in node-blog.tpl.php and some css should do the trick:

<code>

<div class="calendar_date">
    <span class="date_week"><?php print format_date($created, 'custom', 'D'); ?></span>
    <span class="date_month"><?php print format_date($created, 'custom', 'M'); ?></span>
    <span class="date_day"><?php print format_date($created, 'custom', 'd'); ?></span>
    <span class="date_year"><?php print format_date($created, 'custom', 'Y'); ?></span>
</div>

</code>

The main CSS that makes it work is:

.calendar_date {
display:inline;
float:right;
etc, etc . . .

Good luck getting your dates looking cool!

Leave a comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Sign up for updates