You can use Date_Calc class
http://www.phpinsider.com/php/code/Date_Calc/
- Original Message -
From: "Don Read" <[EMAIL PROTECTED]>
To: "Matt "TrollBoy" Wiseman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 1
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"" <[EMAIL PROTECTED]> wrote in message
009801c10009$2a68c720$[EMAIL PROTECTED]">news:009801c10009$2a68c720$[EMAIL PROTECTED]...
> Does
On 28-Jun-01 Matt \"TrollBoy\" Wiseman wrote:
> 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?
don't bet on it.
> If there is no internal feature, perhaps something built into PHPLib?
date('z') / 7;
strftime('%U %V %W');
Re
From: "Brian Paulson" <[EMAIL PROTECTED]>
To: "'Matt "TrollBoy" Wiseman'" <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 2:27 PM
Subject: RE: [PHP] Week Number
> When I needed this before I did dome thing like this
>
> // z day of th
CTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 3:33 PM
Subject: [PHP] Week Number
> 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
o:[EMAIL PROTECTED]]
> Sent: Thursday, June 28, 2001 3:33 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Week Number
>
>
> 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,
""Matt "TrollBoy" Wiseman"" <[EMAIL PROTECTED]> wrote:
> 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?
How about:
intval( date("z")/7 );
Luke Welling
---
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?
Lemme know,
Matt "TrollBoy" Wiseman
Webmaster: Shoggoth.net
Site Designer: phpslash.org
The oldest and strongest
8 matches
Mail list logo