Re: [Calendar] get month/day value with leading zero
| From: | Torsten Roehr | Date: | Sat, 17 Jul 2004 11:48:10 +0000 |
| Subject: | Re: [Calendar] get month/day value with leading zero | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13728@lists.php.net to get a copy of this message | ||
"Stefan Ohrmann" <bshell@gmx.net> wrote in message
news:40F6EF44.5030405@gmx.net...
> Hello,
>
> Am 14.07.2004 13:18 schrieb Torsten Roehr:
> > Can anyone help?
>
> RTFM!
>
> Your are looking for: sprintf("%02d", $int)
>
> regards
>
> Stefan
Hi Stefan,
you mixed something up here. I know how to create a two-digit value AFTER
getting the day/month value from the Calendar object. I was looking for a
Calendar getter format/method that would directly return it this way.
Lorenzo was kind enough to point me to a workaround using a Decorator class.
Regards, Torsten Roehr