Re: TimeStamp BEFORE 1970

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 7, 2005, at 10:17 PM, Bruno B B Magalhães wrote:

Hi Edward,

thanks for replying!



[snip]
Why 1976, because it's a leap year and is between valid range for windows systems.

Let me try to explain the rest.

First I get the input year... which by the way is working fine here...
preg_match('([0-2][0-9][0-9][0-9])', $input, $year);

Was it clear, or I am dreaming awake? hehehehhe


Actually I think I'm the one that is dreaming awake. ;)

Operation + vicodin = fuzzy head.

The math is amazing if it really works for you, and thanks for explaining what your doing.

But my comments on the regex still stand. Just to be sure you understand that the match is working in this case because you are matching the whole string, which is what is in $year[0].

It would return the same results if you used the "normal" string delimiter, not sure that's the
right term for it, of a forward slash instead of the parenthesis. ie

preg_match('/[0-2][0-9][0-9][0-9]/', $input, $year);
		    ^                                ^

But in the end it's what works that counts, eh? ;)

Edward Vermillion
evermillion@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux