php date display string using printf

Schuyler Kuhl
Schuyler Kuhl used Ask the Experts™
on
Greetings,

I am trying to figure out this line of code. It displays the date in this format:

Friday, 23 of October of 2009

<?php printf("%s, %d %s %s %s %d", __(date('l')), date('j'), __('of', 'painter'), __(date('F')), __('of', 'painter'), date('Y')); ?>

It is from a word press theme called painter.

Anyway I want it to display Friday, October 23, 2009.

I have looked at the syntax for printf.

How should I write this to display as I want and what do the underscores before some of the arguments mean?

Thanks very much.

Sky
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016

Commented:
Maybe you should use date() and strtotime() - they are intended for formatting readable dates.
Most Valuable Expert 2011
Top Expert 2016
Commented:
Man Page Here: http://us3.php.net/manual/en/function.date.php

Please try this format:
<?php echo date('l, F d, Y'); ?>
Most Valuable Expert 2011
Top Expert 2016

Commented:
That is a lower-case L, followed by a comma, followed by upper-case F, followed by lower case D, then comma and upper case Y - it is kind of hard to read on my screen.

HTH, ~Ray

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial