On 17 October 2010 20:34, John Taylor-Johnston
wrote:
> Yaay, I'm 45 now :).
Happy Birthday. ;-)
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Oct 17, 2010, at 9:57 PM, Tommy Pham wrote:
-Original Message-
From: Tamara Temple [mailto:tamouse.li...@gmail.com]
On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote:
Here is another nifty piece of code I found. How does this work?
What is 31556926?
Number of second in a ye
> -Original Message-
> From: Tamara Temple [mailto:tamouse.li...@gmail.com]
> Sent: Sunday, October 17, 2010 2:33 PM
> To: PHP General
> Subject: Re: [PHP] Re: strtotime
>
>
> On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote:
>
> > Here is another
On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote:
Here is another nifty piece of code I found. How does this work?
What is 31556926?
Number of second in a year? (31556926 / (24 * 60 * 60) yields
365.2421...)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 17/10/2010 21:34, John Taylor-Johnston wrote:
Yaay, I'm 45 now :).
Here is another nifty piece of code I found. How does this work? What
is 31556926?
number of seconds in a year...?
Rich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.
Yaay, I'm 45 now :).
Here is another nifty piece of code I found. How does this work? What is
31556926?
function calculateAge($birthday){
return floor((time() - strtotime($birthday))/31556926);
}
echo calculateAge('1965-10-17');
http://ca.php.net/manual/en/function.floor.php
---
> -Original Message-
> From: John Taylor-Johnston [mailto:John.Taylor-
> johns...@cegepsherbrooke.qc.ca]
> Sent: Saturday, October 16, 2010 10:58 PM
> To: PHP-General
> Subject: [PHP] Re: strtotime
>
> According to this, I'm 44 not 45 :)p
>
> $birthd
On Oct 17, 2010, at 12:58 AM, John Taylor-Johnston wrote:
According to this, I'm 44 not 45 :)p
$birthday = '1965-08-30';
//calculate years of age (input string: -MM-DD)
function birthday ($birthday){
list($year,$month,$day) = explode("-",$birthday);
$year_diff = date("Y") - $year;
According to this, I'm 44 not 45 :)p
$birthday = '1965-08-30';
//calculate years of age (input string: -MM-DD)
function birthday ($birthday){
list($year,$month,$day) = explode("-",$birthday);
$year_diff = date("Y") - $year;
$month_diff = date("m") - $month;
$day_diff =
I wrote a little AJAX gadget which sent the string typed to a PHP backend
which parsed it using strtotime and then formatting it out again as
something unamiguous (like 2 January 2009). Then every time the date entry
field is changed by the user (with an onKeyUp event), this AJAX call is
trigge
On 24/12/09 12:20, Angus Mann wrote:
Hi all. I need to allow users to enter dates and times, and for a while now
I've been forcing them to use javascript date/time pickers so I can be
absolutely sure the formatting is correct.
Some users are requesting to be able to type the entries themselves
On Sun, Nov 9, 2008 at 3:50 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
> On Sun, 2008-11-09 at 19:46 +0100, gilles wrote:
>> "Thodoris" <[EMAIL PROTECTED]> a crit dans le message de news:
>> [EMAIL PROTECTED]
>> > O/H Bastien Koert ??:
>> >> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
>
On Sun, 2008-11-09 at 19:46 +0100, gilles wrote:
> "Thodoris" <[EMAIL PROTECTED]> a crit dans le message de news:
> [EMAIL PROTECTED]
> > O/H Bastien Koert ??:
> >> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
> >>
> >>
> >>> gilles wrote:
> >>>
> >>>
> Avec la version 4 de php, strtot
O/H gilles έγραψε:
"Thodoris" <[EMAIL PROTECTED]> a ιcrit dans le message de news:
[EMAIL PROTECTED]
O/H Bastien Koert ??:
2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
gilles wrote:
Avec la version 4 de php, strtotime("20080950") fonctionne correctement
en
"Thodoris" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> O/H Bastien Koert ??:
>> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
>>
>>
>>> gilles wrote:
>>>
>>>
Avec la version 4 de php, strtotime("20080950") fonctionne correctement
en
allant sur le
O/H Bastien Koert ??:
2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
gilles wrote:
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide
This is an ENGLISH list, plea
"Lester Caine" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Ashley Sheridan wrote:
I'll translate
In PHP4, strtotime works fine
in PHP5 strtotime gives a result of 19700101 when the data entered was
strtotime("20080950")
>>> What
Ashley Sheridan wrote:
I'll translate
In PHP4, strtotime works fine
in PHP5 strtotime gives a result of 19700101 when the data entered was
strtotime("20080950")
What does "work fine" mean? "20080950" isn't normal, so what is the
expected result?
Well, for starts Micah is right, your da
On Sat, 2008-11-08 at 18:57 -0600, Micah Gersten wrote:
> Bastien Koert wrote:
> > 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
> >
> >
> >> gilles wrote:
> >>
> >>
> >>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
> >>> allant sur le mois d'octobre, alors
Bastien Koert wrote:
> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
>
>
>> gilles wrote:
>>
>>
>>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>>> Merci de votre aide
>>>
>>>
>>>
>> T
2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
> gilles wrote:
>
>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>> Merci de votre aide
>>
>>
> This is an ENGLISH list, please rephrase your question in
gilles wrote:
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide
This is an ENGLISH list, please rephrase your question in english and
people might understand.
Cette liste est une l
On 8 Oct 2008, at 12:42, Nathan Rixham wrote:
Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($
Thodoris wrote:
I know that *strtotime*() only recognises the formats mm/dd/,
-mm-dd and mmdd
for numeric months but I need do something like that:
function dateWebToMysql($webdate){
$format = 'Y-m-d';
$timestamp = strtotime($webdate);
return date($format,$timestam
Ron Piggott wrote:
> I see I broke a rule. The variable can't start with a number. Still
> strtotime doesn't work with -18 months How would you handle this?
> Ron
Uh, it works fine here:
php5 -r '$a=strtotime("-18 months"); print strftime("%Y%m%d",$a); ':
20060810
/Per Jessen, Zürich
I see I broke a rule. The variable can't start with a number. Still
strtotime doesn't work with -18 months How would you handle this? Ron
On Sun, 2008-02-10 at 06:46 -0500, Ron Piggott wrote:
> I am trying to calculate what was the date 18 months ago. When I give
> the command:
>
> $18_mont
Mike Morton wrote:
I have been using:
$nextSaturday= date("m/d/Y",strtotime("next saturday"));
For months long time now with out problems, but in the last two days, it
went kind of funky. It is now returning:
02/09/2008 instead of the expected 02/02/2008. I have tried the same code
on anothe
On Tue, 24 Oct 2006 20:36:08 -0400, Ron Piggott (PHP) wrote:
>
> I have used the strtotime command to calculate a week ago (among other
> things) with syntax like this:
>
> $one_week_ago = strtotime("-7 days");
> $one_week_ago = date('Y-m-d', $one_week_ago);
>
> How would you use this command t
Al wrote:
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). "";//2005/04/04/18
echo date('Y/m/d/H', strtotime("-1 day")). "";
//2005/04/03/18
echo date('Y/m/d/H', strtotime("last Sunday")). "";
//2005/04/02/23
Sunday shows a
strtotime returns a timestamp of a data type(ex 05/07/2002)
strtotime(05/07/2002)
you can't recevie a timpstamp from a time of a day.
--
Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Jennifer Koenig" <[EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> Hallo,
>
> Why would strtotime fail (i.e. return a -1)? I check the type with gettype,
> which tells me that the argument I'm passing in is a string. I cast it to a
> string before passing it in, with the same results (returns a -1).
31 matches
Mail list logo