Re: Missing function.

From: Date: Sat, 30 Oct 1999 14:46:45 +0000
Subject: Re: Missing function.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-12025@lists.php.net to get a copy of this message
Hi, Thank you Rasmus for replying. Developers, can it be added to PHP in next releases? Thanks in advance, Noor On Sat, 30 Oct 1999, Rasmus Lerdorf wrote: > > Hello all, > > > > I think I found a missing function in PHP's Date/Time functions. The > > date()'s syntax is as follows: > > > > string date(string format, int timestamp); > > > > What is missing is a function to revert date() behavior as follows: > > > > timestamp datestamp(string format, string date); > > > > Behavior is as follows: > > > > // Format current date. > > $string = date( "m-d-Y" ); > > . > > . > > . > > // Get time stamp from $string. > > $time = datestamp( "m-d-Y", $string ); > > > > Is it possible to add this function in the next release of PHP, also in > > PHP4 and PHP3 as I am still using version 3.0.9. > > > > This will help in doing generic code to handle date and time functions > > against SQL databases. > > This is not a trivial thing, but there is code in PHP 3/4 intended to > solve this, but I am not sure of its current state. See the parsedate.c > file in both trees. > > -Rasmus > >

« previous php.dev (#12025) next »