Re: week of example code

From: Date: Mon, 08 Jan 2001 23:03:41 +0000
Subject: Re: week of example code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33340@lists.php.net to get a copy of this message
actually after sending the e-mail i wrote a second script to ereg_replace() a bunch of things and got it formated the way i needed it. thanks anyway :] <-----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) <------------------------------------------------------> On Tue, 9 Jan 2001, brad mccrorey wrote: > 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 > > > > > -- > 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 > >

« previous php.general (#33340) next »