Date: 10/30/99
- Next message: Bug Database: "[PHP-DEV] Bug #2641 Updated: Apache 'make' failure with gd-1.7.3 and mysql-3.22.26a"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DEV] New compile failure"
- In reply to: noor <email protected>: "[PHP-DEV] Missing function."
- Next in thread: noor <email protected>: "Re: [PHP-DEV] Missing function."
- Reply: noor <email protected>: "Re: [PHP-DEV] Missing function."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #2641 Updated: Apache 'make' failure with gd-1.7.3 and mysql-3.22.26a"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DEV] New compile failure"
- In reply to: noor <email protected>: "[PHP-DEV] Missing function."
- Next in thread: noor <email protected>: "Re: [PHP-DEV] Missing function."
- Reply: noor <email protected>: "Re: [PHP-DEV] Missing function."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

