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!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.