Re: Week Number
| From: | Hugh Bothwell | Date: | Sat, 30 Jun 2001 01:35:58 +0000 |
| Subject: | Re: Week Number | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55618@lists.php.net to get a copy of this message | ||
How about this?
$today = getdate();
$week = (int) ($today["yday"] / 7);
Note: I'm not sure whether $today["yday"] begins with 0 or 1.
""Matt "TrollBoy" Wiseman"" <trollboy@shoggoth.net> wrote in
message
news:009801c10009$2a68c720$1639e4d0@metalink.net...
> Does know of anyway to get PHP to return the week number?
> As in there are 52 weeks in a year and this is week x?
> If there is no internal feature, perhaps something built into PHPLib?