Re: Working out the name of the day given a date

From: Date: Tue, 16 Jan 2001 16:27:48 +0000
Subject: Re: Working out the name of the day given a date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34837@lists.php.net to get a copy of this message
On Tue, 16 Jan 2001, Jon Haworth wrote: > Hello list, > > Just a quickie. Does anyone have a code snippet for calculating the day of > the week given a date? I was hoping I could feed a string like "20010116" to > a function and have it return "Tuesday" - it doesn't have to be exactly this > date format that is used for the input, but I do need the name of the day on > the output! > > I'm hunting around at the moment but I haven't had any joy so far, I thought > I'd see if anyone's already invented this wheel... > > Cheers > Jon > Try date('l'). (lowercase L) -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#34837) next »