L PROTECTED]
> Subject: Re: [PHP] Date () Help please
>
> OK thought I should share in case any needs it but got it to work.
Here
> is
> what it looks like and thanks to Richard Baskett for the help.
>
> $yr= date (Y);
> $mnth = date (F);
> $dy= 1;
> $string = &q
OK thought I should share in case any needs it but got it to work. Here is
what it looks like and thanks to Richard Baskett for the help.
$yr= date (Y);
$mnth = date (F);
$dy= 1;
$string = "$dy $mnth $yr";
$today = date("w",strtotime($string));
Thanks for the help
Attila
http://www.glorynaspira
Ok your way works and thanks for the help but still struggling a little bit
here is what I have.
$year = date (Y); //This gets me the current year 2002
$month = date (m); //This gets me the current month 07
$day= 1; //always looking for the 1st day of the month
$today = date("w"); // $today will result in '1'
$today = date("D"); // $today will result in 'Mon'
$today = date("l"); // $today will result in 'Monday'
Now if you wanted to feed the script something like this:
$string = "01 Jul 2002";
$today = date("l",strtotime($string));
This will result in
Hi Sundog,
Can help you with dates (but no, if you want that kind you'll definitely not be
wanting my advice...)
- Original Message -
> I am trying to determine if todays date ($today) is within a week
> ($startcheck) of a given date ($dob). This is what I have so far.
>
> $todaydate = (
28/2003" is 28 Feb 2003 month is 2 End of month is 29
test date "2/29/2003" is 01 Mar 2003 month is 3 End of month is 31
test date "2/28/2004" is 28 Feb 2004 month is 2 End of month is 29
test date "2/29/2004" is 29 Feb 2004 month is 2 End of month is 29
last day
t
Better still, use the date("t"); to find out how many days are in the given
month. This part of the date function is a blessing, given the varying days
in months, and the fact that we've a leap year every four years.
James
"Daniel Rezny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">ne
[EMAIL PROTECTED] (Reductor) wrote:
> $todaydate = date("m");
> $tomorrowdate = date("m",time() + 86400);
> if($todaydate != $tomorrowdate){
>echo "Tomorrow is a new month";
>}
or
if (date("d") == date("j"))
echo "last day";
or something else :)
> - Original Message --
Hello Yamin,
Monday, July 23, 2001, 9:27:46 AM, you wrote:
YP> hi,
YP> how do i check that the current date is the end of month
YP> Thanks in Advance
If you want to check how long is current month and use this value
later you can use this:
$month=("m"); //can be like this depend on if you s
$todaydate = date("m");
$tomorrowdate = date("m",time() + 86400);
if($todaydate != $tomorrowdate){
echo "Tomorrow is a new month";
}
- Original Message -
From: Yamin Prabudy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 5:27 PM
Subject: [PHP] date HELP !
10 matches
Mail list logo