How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying, unsuccessfully:
$nextdate = 8/2/2009;
if(strtotime($nextdate)=getdate()){
echo Sorry, your next evaluation date cannot be in the past,
Click BACK to continue.;
exit;
2009/8/28 David Stoltz dsto...@shh.org:
How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying, unsuccessfully:
$nextdate = 8/2/2009;
if(strtotime($nextdate)=getdate()){
echo Sorry, your next evaluation date cannot be in the past,
At 10:12 AM -0400 8/28/09, David Stoltz wrote:
How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying, unsuccessfully:
$nextdate = 8/2/2009;
if(strtotime($nextdate)=getdate()){
echo Sorry, your next evaluation date cannot be in the
[mailto:stut...@gmail.com]
Sent: Friday, August 28, 2009 10:19 AM
To: David Stoltz
Cc: php-general@lists.php.net
Subject: Re: [PHP] Date Comparison
2009/8/28 David Stoltz dsto...@shh.org:
How to I ensure a variable date is not in the past, compared to the
current date? Here's how I'm trying
hi all,
$dateNow = date('Y-m-d H:i:s');
echo pstrong.$dateNow ./strong/p;
can some see why the date time is lagging or late by 30 minutes from the
server time even when server time are correct
On Tue, Apr 28, 2009 at 3:45 PM, Andrew Williams
andrew4willi...@gmail.comwrote:
hi all,
$dateNow = date('Y-m-d H:i:s');
echo pstrong.$dateNow ./strong/p;
can some see why the date time is lagging or late by 30 minutes from the
server time even when server time are correct
--
Best
Where $date_reference is 2009-04-18 the following code gives me a day of
1969-12-30. How do I get it to be 2009-04-17?
$previous_date = strtotime(-1 days, $date_reference);
$previous_date = date('Y-m-d', $previous_date);
echo $previous_date; outputs 1969-12-30
Ron
Ron Piggott wrote:
Where $date_reference is 2009-04-18 the following code gives me a day of
1969-12-30. How do I get it to be 2009-04-17?
$previous_date = strtotime(-1 days, $date_reference);
$previous_date = date('Y-m-d', $previous_date);
Slightly wrong syntax.
$previous_date =
Ron Piggott wrote:
Where $date_reference is 2009-04-18 the following code gives me a day of
1969-12-30. How do I get it to be 2009-04-17?
$previous_date = strtotime(-1 days, $date_reference);
$previous_date = date('Y-m-d', $previous_date);
echo $previous_date; outputs 1969-12-30
Ron
Thanks Chris. It has been a while since I used this command. Ron
On Mon, 2009-04-20 at 13:27 +1000, Chris wrote:
Ron Piggott wrote:
Where $date_reference is 2009-04-18 the following code gives me a day of
1969-12-30. How do I get it to be 2009-04-17?
$previous_date = strtotime(-1
-general@lists.php.net
Subject: Re: [PHP] Date Issue
Boyd, Todd M. wrote:
Are you sure this isn't like Javascript's getMonth function? Its
index may begin at 0, making day 0 the first day of the year.
Hmm, though I know us programmers love to start counting at zero, why
would
, 2008 4:50 PM
To: Boyd, Todd M.
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Date Issue
Boyd, Todd M. wrote:
Are you sure this isn't like Javascript's getMonth function? Its
index may begin at 0, making day 0 the first day of the year.
Hmm, though
On Tue, Nov 18, 2008 at 2:58 PM, Ashley Sheridan
[EMAIL PROTECTED] wrote:
It just flew in the face of all I knew at the time to have a
non-associative system-generated array (by that I mean one whos keys are
integars and not string keys) that doesn't start at 0. No other arrays
defined in
$smont = 10;
$sday = 13;
$syear = 2008;
$timestamp = mktime(0,0,0,$smont,$sday,$syear);
$thismonth = getdate($timestamp);
Here is where the problem comes into play.
echo $thismonth['yday'];
This displays 286 when in fact its 287.
Is there a problem in my ini file or what is the deal.
--
PHP
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 10:50 AM
To: php-general@lists.php.net
Subject: [PHP] Date Issue
$smont = 10;
$sday = 13;
$syear = 2008;
$timestamp = mktime(0,0,0,$smont,$sday,$syear);
$thismonth = getdate
Boyd, Todd M. wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 10:50 AM
To: php-general@lists.php.net
Subject: [PHP] Date Issue
$smont = 10;
$sday = 13;
$syear = 2008;
$timestamp = mktime(0,0,0,$smont,$sday,$syear);
$thismonth
Boyd, Todd M. wrote:
Are you sure this isn't like Javascript's getMonth function? Its index may begin at 0, making
day 0 the first day of the year.
HTH,
Todd Boyd
Web Programmer
Hmm, though I know us programmers love to start counting at zero, why
would something as static as a date
-Original Message-
From: Craige Leeder [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 4:50 PM
To: Boyd, Todd M.
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Date Issue
Boyd, Todd M. wrote:
Are you sure this isn't like Javascript's getMonth
On Mon, 2008-11-17 at 16:57 -0600, Boyd, Todd M. wrote:
-Original Message-
From: Craige Leeder [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 4:50 PM
To: Boyd, Todd M.
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Date Issue
Boyd, Todd M
Hi all,
I've got dates in the following formats e.g.
August 05, 2008, 10:14 am (e.g. today's date)
August 04, 2008, 7:08 am (e.g. yesterda's date)
August 03, 2008, 9:08 am (e.g. in the past)
I am trying to format these dates do I can display them like this
Today at 10:14 am (today)
Yesterday
On Tue, Aug 5, 2008 at 11:48 AM, Don Don [EMAIL PROTECTED] wrote:
Hi all,
I've got dates in the following formats e.g.
August 05, 2008, 10:14 am (e.g. today's date)
August 04, 2008, 7:08 am (e.g. yesterda's date)
August 03, 2008, 9:08 am (e.g. in the past)
I am trying to format these
On Tue, Aug 5, 2008 at 11:48 AM, Don Don [EMAIL PROTECTED] wrote:
Hi all,
I've got dates in the following formats e.g.
August 05, 2008, 10:14 am (e.g. today's date)
August 04, 2008, 7:08 am (e.g. yesterda's date)
August 03, 2008, 9:08 am (e.g. in the past)
I am trying to format these
Hello everybody,
I hope you all have a nice day, mines not that good 'cause i have encountered a
strange problem.
i have a few functions to work with dates. they are all very simple, a few
lines of code.
this first one does just gives you the monday of the current week:
function
On Fri, Jul 11, 2008 at 9:03 AM, Fabian Frei [EMAIL PROTECTED]
wrote:
Hello everybody,
I hope you all have a nice day, mines not that good 'cause i have
encountered a strange problem.
i have a few functions to work with dates. they are all very simple, a few
lines of code.
this first one
I am having a date time comparison issue.
I have statically set the values here. But the data is fed from the database,
CaldTime is timestamp and since it will not allow me to have 2 timestamps in
the same table I set the CallEnd varchar(12). Storing the data they seem to be
the same for
On Mon, Apr 7, 2008 at 9:42 AM, [EMAIL PROTECTED] wrote:
I am having a date time comparison issue.
I have statically set the values here. But the data is fed from the
database, CaldTime is timestamp and since it will not allow me to have 2
timestamps in the same table I set the CallEnd
On Mon, Apr 7, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote:
t the data is fed from the database, CaldTime is timestamp and since
it will not allow me to have 2 timestamps in
the same table
?? What database are you using? It sounds like it has a specific
meaning of timestamp - probably the last
Yes my mistake was looking at another record and published another.
But I figured it out now i can publish 1:45 like i wanted. Having a moment
there.
Thank you
Richard L. Buskirk
On Mon, Apr 7, 2008 at 9:42 AM, [EMAIL PROTECTED] wrote:
I am having a date time comparison issue.
I have
Thank you that is exactly what i did to figure it out.
Just was having a brain fart there for a minute.
On Mon, Apr 7, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote:
t the data is fed from the database, CaldTime is timestamp and since
it will not allow me to have 2 timestamps in
the same table
On Mon, Apr 7, 2008 at 11:42 AM, [EMAIL PROTECTED] wrote:
I am having a date time comparison issue.
I have statically set the values here. But the data is fed from the
database, CaldTime is timestamp and since it will not allow me to have 2
timestamps in the same table I set the CallEnd
Dan I made a solution as below.
$time1 = strtotime($sqldata[CaldTime]);
$time2 = strtotime($sqldata[CallEnd]);
$interval = $time2 - $time1;
$TLength = date(i:s, strtotime(2008-01-01 01:00:$interval));
Result 01:45
Works perfect for me. Do you agree or disagree dan?
On Mon, Apr 7, 2008 at
On Mon, Apr 7, 2008 at 1:03 PM, [EMAIL PROTECTED] wrote:
Dan I made a solution as below.
$time1 = strtotime($sqldata[CaldTime]);
$time2 = strtotime($sqldata[CallEnd]);
$interval = $time2 - $time1;
$TLength = date(i:s, strtotime(2008-01-01 01:00:$interval));
Result 01:45
Works
Daylight Savings Time must die!
Oh, by the way, thanks for your reply.
So last night my clock went forward an hour on this cool DST-aware
dual alarm clock radio I bought in 1999. Apparently DST rules have
changed http://en.wikipedia.org/wiki/Year_2007_problem so now my clock
isn't as cool
Your doing the same thing i did look at date(d)
When its the 31 like yesteday of course it can not find the 31 of months that
do not have them.
Thats why it errored.
String worked up till monday which explained alot. I just did not look at what
i was doing. changed the code to
$zomonth =
I generally use 1 hour after midnight with mktime() to avoid the edge
cases of daylight savings etc...
mktime(1, 0, 0, date('m') - 1, date('d'), date('Y'));
You also have to consider that you *COULD* call this right on the cusp
of midnight, and the call to date('d') could happen one day, and the
If you want the DAY before, you can use the -1 for the day, and get
what you want.
mktime() will wrap the month as needed.
But, yeah, if you try to hit a MONTH before by putting in a month
before AND the day, it will slingshot back and forth to get what you
don't want.
If you want the MONTH
Not understanding why this is happening.
$month = date(F, mktime(0,0,0, date(m), date(d), date(Y)));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d), date(Y)));
echoing out the exact same month
March
March
Checked server timezone/date/time all is good. Am I half asleep at the wheel on
On Mon, Mar 31, 2008 at 3:07 PM, [EMAIL PROTECTED] wrote:
Not understanding why this is happening.
$month = date(F, mktime(0,0,0, date(m), date(d), date(Y)));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d), date(Y)));
echoing out the exact same month
March
March
Checked
You need apostrophes (or quotes) around your args to date() in the
parameters...
date('m')
As it stands now, PHP assumes you mean the constant m
(http://php.net/define) and that's not defined, so they are all 0.
So you are passing in 0 to ALL the args.
You also should use E_ALL for your
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current month.
$month = date(F, mktime(0,0,0, date('m'), date('d'), date('Y')));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d), date(Y)));
$nmonth = date(F, mktime(0,0,0, date(m)+1, date(d),
On Mon, Mar 31, 2008 at 4:15 PM, [EMAIL PROTECTED] wrote:
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current
month.
$month = date(F, mktime(0,0,0, date('m'), date('d'), date('Y')));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d),
On Mon, Mar 31, 2008 at 3:15 PM, [EMAIL PROTECTED] wrote:
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current
month.
$month = date(F, mktime(0,0,0, date('m'), date('d'), date('Y')));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d),
On Mon, Mar 31, 2008 at 4:15 PM, [EMAIL PROTECTED] wrote:
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current
month.
Like I said, mktime makes corrections for otherwise invalid dates.
Today is March 31. Moving the month number back by one (-1)
Thank you again Dan. Thought never crossed my mind the day being the 31st. That
fixed it.
Richard L. Buskirk
On Mon, Mar 31, 2008 at 4:15 PM, [EMAIL PROTECTED] wrote:
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current
month.
On Mon, Mar 31, 2008 at 4:15 PM, [EMAIL PROTECTED] wrote:
I tried that a big no go.
Seems if I do a +1 i get 2 months from now and a -1 gives me the current
month.
$month = date(F, mktime(0,0,0, date('m'), date('d'), date('Y')));
$zomonth = date(F, mktime(0,0,0, date(m)-1, date(d),
On Mon, Mar 31, 2008 at 4:24 PM, [EMAIL PROTECTED] wrote:
Thank you again Dan. Thought never crossed my mind the day being the 31st.
That fixed it.
Thank Andrew Ballard, actually. He said it even before I did.
I'm getting slow in my old age! ;-P
--
/Daniel P. Brown
Forensic
On Sun, March 23, 2008 11:17 pm, Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks
ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does
update the clock) shows
the email header as Mon, 10 Mar 2008 14:35:44 -0500
and in the email client without looking at raw source as Date: March
10, 2008 2:35:44 PM CDT, but the body of the email (which used PHP
date(Y-m-d H:i:s)) shows 2008-03-10 13:35:44.
Note 13 instead of 14.
I've asked the admin
to daylight savings time on
3/10 and I'm sure our admin had to manually update the clock) shows
the email header as Mon, 10 Mar 2008 14:35:44 -0500
and in the email client without looking at raw source as Date: March
10, 2008 2:35:44 PM CDT, but the body of the email (which used PHP
date(Y-m-d H:i:s
Could someone then help me modify the PHP script so I won't have this
timezone issue? I don't understand from looking at the date page on the
PHP web site the change(s) I need to make. Thanks, Ron
?
$date1 = strtotime($date1);
$date2 = strtotime($date2);
$factor = 86400;
$difference =
(top-posting!)
Add either the round function or ceil function.
On Mar 25, 2008, at 6:47 AM, Ron Piggott [EMAIL PROTECTED]
wrote:
Could someone then help me modify the PHP script so I won't have this
timezone issue? I don't understand from looking at the date page on
the
PHP web site
Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone see anything wrong with
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone see anything wrong with
the way this is
On 24/03/2008, at 5:17, Ron Piggott wrote:
I have this math equation this list helped me generate a few weeks
ago.
The purpose is to calculate how many days have passed between 2 dates.
Right now my output ($difference) is 93.958333 days.
I am finding this a little weird. Does anyone
On Sun, Mar 23, 2008 at 9:17 PM, Ron Piggott [EMAIL PROTECTED] wrote:
I have this math equation this list helped me generate a few weeks ago.
The purpose is to calculate how many days have passed between 2 dates.
snip
$date1 = strtotime($date1); (March 21st 2008)
$date2 =
$start_date = date(Y-m-d h:i:s, strtotime($date_format));
echo $start_date;
?
output is 2008-02-22 02:00:00
but not 2008-02-22 14:00:00
How can i get my output as 2008-02-22 14:00:00.
Use H instead of h. And try the manual.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript
Hi All,
Greetings!!
A small PHP Script for help
?php
$date_format = '02/22/2008 14:00:00';
$start_date = date(Y-m-d h:i:s, strtotime($date_format));
echo $start_date;
?
output is 2008-02-22 02:00:00
but not 2008-02-22 14:00:00
How can i get my output as 2008-02-22 14:00:00.
Thanks
V
--
On Fri, Feb 22, 2008 at 2:48 PM, VamVan [EMAIL PROTECTED] wrote:
Hi All,
Greetings!!
A small PHP Script for help
?php
$date_format = '02/22/2008 14:00:00';
$start_date = date(Y-m-d h:i:s, strtotime($date_format));
echo $start_date;
?
output is 2008-02-22 02:00:00
but not
2008. 02. 22, péntek keltezéssel 11.48-kor VamVan ezt írta:
Hi All,
Greetings!!
A small PHP Script for help
?php
$date_format = '02/22/2008 14:00:00';
$start_date = date(Y-m-d h:i:s, strtotime($date_format));
$start_date = date(Y-m-d H:i:s, strtotime($date_format));
RTFM:
$start_date = date(Y-m-d H:i:s, strtotime($date_format)); echo
$start_date; ?
capital H should do it
-Mensagem original-
De: VamVan [mailto:[EMAIL PROTECTED]
Enviada em: sexta-feira, 22 de fevereiro de 2008 16:48
Para: php-general@lists.php.net
Assunto: [PHP] Date Function
Hi All
: sexta-feira, 22 de fevereiro de 2008 16:48
Para: php-general@lists.php.net
Assunto: [PHP] Date Function
Hi All,
Greetings!!
A small PHP Script for help
?php
$date_format = '02/22/2008 14:00:00';
$start_date = date(Y-m-d h:i:s, strtotime($date_format)); echo
$start_date
On Wed, February 6, 2008 11:13 am, Martin Marques wrote:
Nathan Nobbe escribió:
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED]
wrote:
I got an update from tzdata on a Debian server due to a daylight
saving
change here in Argentina.
The problem is that, even when the system sees
Martin Marques schreef:
Nathan Nobbe escribió:
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED]
wrote:
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
I doubt that debian stable is pushing newer versions of TZ db, than that found
On Feb 7, 2008 8:34 AM, Jochem Maas [EMAIL PROTECTED] wrote:
Martin Marques schreef:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
it should be set to something, so fix that.
All other points being valid, Jochem, I
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED] wrote:
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
The problem is that, even when the system sees the correct time, php
keeps giving me the *old* hour.
$ date
mié feb 6 09:03:57
Jochem Maas escribió:
Martin Marques schreef:
Nathan Nobbe escribió:
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED]
wrote:
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
I doubt that debian stable is pushing newer versions of TZ
On 2/7/08, Daniel Brown [EMAIL PROTECTED] wrote:
On Feb 7, 2008 8:34 AM, Jochem Maas [EMAIL PROTECTED] wrote:
Martin Marques schreef:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
it should be set to something, so
Daniel Brown schreef:
On Feb 7, 2008 8:34 AM, Jochem Maas [EMAIL PROTECTED] wrote:
Martin Marques schreef:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
it should be set to something, so fix that.
All other points being
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
The problem is that, even when the system sees the correct time, php
keeps giving me the *old* hour.
$ date
mié feb 6 09:03:57 ARST 2008
$ echo ?php echo date('H:i') . \\n\; ?|php5
08:04
What
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED] wrote:
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
The problem is that, even when the system sees the correct time, php
keeps giving me the *old* hour.
$ date
mié feb 6 09:03:57
Nathan Nobbe escribió:
On Feb 6, 2008 6:13 AM, Martin Marques [EMAIL PROTECTED] wrote:
I got an update from tzdata on a Debian server due to a daylight saving
change here in Argentina.
The problem is that, even when the system sees the correct time, php
keeps giving me the *old* hour.
$ date
On Feb 6, 2008 12:13 PM, Martin Marques [EMAIL PROTECTED] wrote:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
then you should probly set it ;)
Anyway, I found out that PHP uses an internal tz database (very bad
IMHO) and it
Nathan Nobbe escribió:
On Feb 6, 2008 12:13 PM, Martin Marques [EMAIL PROTECTED] wrote:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
then you should probly set it ;)
It has the right TZ set. I checked it with
On Feb 6, 2008 12:48 PM, Martin Marques [EMAIL PROTECTED] wrote:
Nathan Nobbe escribió:
On Feb 6, 2008 12:13 PM, Martin Marques [EMAIL PROTECTED] wrote:
see what you have as the value for the date.timezone ini setting.
I've already checked that, and it's not set.
then you should
At 10:02 AM +0200 12/14/07, Arno Kuhl wrote:
I'm battling with getting the last week number using date(W, $unixdate). If
the date is 30 December 2007 ($unixdate=1198965600)
Not accordingly to my calculations -- try it:
http://webbytedd.com/c/unix-time/
Cheers,
tedd
--
---
-Original Message-
From: tedd [mailto:[EMAIL PROTECTED]
Sent: 14 December 2007 04:50
To: [EMAIL PROTECTED]; php-general@lists.php.net
Cc: Arno Kuhl
Subject: Re: [PHP] PHP date: ISO year = loss of hair
At 10:02 AM +0200 12/14/07, Arno Kuhl wrote:
I'm battling with getting the last week
missed about PHP date? Any pointers would be greatly
appreciated.
Thanks
Arno
If the last week of the year is the one that has Dec. 28 in it, and
the last week number is 52, then Dec. 30 SHOULD return 1. Dec. 30 is
not in the 53rd week of 2007; it is in the first week of 2008
according
-Original Message-
From: Andrew Ballard [mailto:[EMAIL PROTECTED]
Sent: 14 December 2007 04:38
To: PHP General list
Subject: Re: [PHP] PHP date: ISO year = loss of hair
If the last week of the year is the one that has Dec. 28 in it, and the last
week number is 52, then Dec. 30 SHOULD
missed about PHP date? Any pointers would be greatly
appreciated.
I think Arlo Leach fought this battle and posted here or in the
Chicago PHP User Group about it...
You should be able to find PHP-General archives easily enough.
The Chicago group ones are here:
http://sourceforge.net/mailarchive
and the date to see if a Sunday occurs and if so add one to the
week number. It looks like it will work but seems ridiculously laboured for
such a simple issue. Am I overlooking something obvious here - is there
something I've missed about PHP date? Any pointers would be greatly
appreciated.
Thanks
I have extracted a small portion of a calendar application I developed
recently to show some strange behavior with the date() function. When I
run this I get duplicate dates occasionally down the list. I'm seeing
11/4 twice for example. Sometimes dates are missing from the list. The
results
I'm seeing
11/4 twice for example. Sometimes dates are missing from the list. The
results change from day to day.
That would be DST. The number of seconds per day changes on Nov. 4,
2007 in the US local time zones.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tue, 2007-09-18 at 15:32 -0500, Greg Donald wrote:
I have extracted a small portion of a calendar application I developed
recently to show some strange behavior with the date() function. When I
run this I get duplicate dates occasionally down the list. I'm seeing
11/4 twice for example.
I would like to have my users input the date formate as mm-dd- mysql
wants the data to come down as -mm-dd.
The question I have is how do I convert from the mm-dd- to -mm-dd so
that I can write it out to the database?
--
PHP General Mailing List (http://www.php.net/)
To
Just have your input form get it in sections, then piece it all together when
dumping it to MySQL
This way you can transparent the code on the front to users, but have it in the
right format in the backend.
Mike Ryan [EMAIL PROTECTED] wrote:
I would like to have my users input the date
On Wed, August 29, 2007 4:12 pm, Mike Ryan wrote:
I would like to have my users input the date formate as mm-dd-
mysql
wants the data to come down as -mm-dd.
The question I have is how do I convert from the mm-dd- to
-mm-dd so
that I can write it out to the database?
You
Small issue with formatting a date. If I type in this:
echo date(g:i:s a \o\n l F j, Y);
the n character in the word on doesn't appear, but instead what I
get is a new line in the source code. If I type it as:
echo date(g:i:s a \on l F j, Y);
I get the number 8 (current month) where the n
Kevin Murphy wrote:
Small issue with formatting a date. If I type in this:
echo date(g:i:s a \o\n l F j, Y);
the n character in the word on doesn't appear, but instead what I
get is a new line in the source code. If I type it as:
echo date(g:i:s a \on l F j, Y);
I get the number 8 (current
On Mon, August 13, 2007 12:50 pm, Kevin Murphy wrote:
Small issue with formatting a date. If I type in this:
echo date(g:i:s a \o\n l F j, Y);
the n character in the word on doesn't appear, but instead what I
get is a new line in the source code. If I type it as:
echo date(g:i:s a \on l F
$q = ceil( month / 4 );
--
/Thunis
The ships hung in the sky in much the same way that bricks don't.
--The Hitchikers Guide to the Galaxy
revDAVE skrev:
I have segmented a year into four quarters (3 months each)
nowdate = the month of the chosen date (ex: 5-30-07 = month 5)
Q: What is the
of course ceil( month / 3 );
--
/Thunis
Don't panic.
--The Hitchikers Guide to the Galaxy
Fredrik Thunberg skrev:
$q = ceil( month / 4 );
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Well then after or before that you have to check that the month value is
between 1 and 12 to make sure there's no input errors, then what if you ever
want ot change the quarters yeah anway I just wanted an excuse to tell
people to go low tech and use a switch, it's only 12 entries, and you
If the date is coming from a database, there might be a
function/format already for that...
And http://php.net/date may also have a format specifier for Quarter.
If not, try this:
$quarter = ((int) ($month / 4)) + 1;
On Sat, June 30, 2007 10:14 am, revDAVE wrote:
I have segmented a year into
I have segmented a year into four quarters (3 months each)
nowdate = the month of the chosen date (ex: 5-30-07 = month 5)
Q: What is the best way to calculate which quarter (1-2-3 or 4) the chosen
date falls on?
Result - Ex: 5-30-07 = month 5 and should fall in quarter 2
--
Thanks - RevDave
At 6/30/2007 08:14 AM, revDAVE wrote:
I have segmented a year into four quarters (3 months each)
nowdate = the month of the chosen date (ex: 5-30-07 = month 5)
Q: What is the best way to calculate which quarter (1-2-3 or 4) the chosen
date falls on?
Result - Ex: 5-30-07 = month 5 and should
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Ron Piggott wrote:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Depends what $start_date looks like.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Can you give us an example of $start_date?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
2007. 06. 20, szerda keltezéssel 09.35-kor Ron Piggott ezt írta:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
depends on what format do you have $start_date in
if you have something like
Ron Piggott skrev:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Of course depending on what $start_date looks like, but this should work
most of the time:
$timestamp = strtotime( $start_date
101 - 200 of 1042 matches
Mail list logo