Re: week of example code
| From: | brad mccrorey | Date: | Mon, 08 Jan 2001 22:56:52 +0000 |
| Subject: | Re: week of example code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33337@lists.php.net to get a copy of this message | ||
dunno if this works or not, it was on the php manual page for the date command as a
user submitted comment. anyhow, give it a go. =)
function weekofyear() {
$d = 1;
while (date("w",mktime(0,0,0,1,$d,date("Y"))) != 1)
{
$d++;
};
return(floor((date("z")-$d+13)/7.0-1));
}
good luck!
Cheers,
Brad
>
>
> im looking for some example code that will print out what week of the
> month it is in this format
>
> year_month_week
>
> ive attempted this on my own with no success.
>
> <-----CoreComm-Internet-Services--http://core.com/----->
> (Jon Marshall CoreComm Services Chicago)
> (jonathon.marshall@core.com Systems Engineer II)
> (enthalpy@core.com Network Operations)
> <-----Enthalpy.org------------http://enthalpy.org/----->
> (enthalpy@enthalpy.org The World of Nothing)
> <------------------------------------------------------>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>