Re: String to time
| From: | (David Sklar) | Date: | Mon, 12 Jul 1999 14:25:54 +0000 |
| Subject: | Re: String to time | ||
| References: | 1 | Groups: | lists.php.dev |
| Request: | Send a blank email to php-dev+get-8388@lists.php.net to get a copy of this message | ||
This is cool, like perl's Time::ParseDate. Nice. How would you feel about
changing the function name to parsedate() (like Perl)?
-dave
Nick Sayer (nsayer@quack.kfu.com) wrote:
: I have just finished another loadable function. This one is an
: interface to a routine I swiped out of C-news a long time ago.
: It's a YACC thing called 'getdate'. You give it a free form date
: string and it turns it into a time_t. It also accepts offset style
: date input, such as "now + 1 minute". It takes as input a time value
: to be used as the base for such relative time strings.
: My strtotime() function takes either 1 or 2 arguments. The first is
: the string, the second is an optional timeval (the default is the
: current time if this argument is left out). It returns a timeval,
: or -1 if the input specifies an illegal time (years must be 1970-2099,
: the way I compiled it. As it was in C-news, years beyond 2000 didn't work,
: but the fix was simple).
: I can provide it to anyone who is interested. I didn't find a similar
: function in the manual (at least one whose input was as free-form). If
: it exists, then tell me and watch me turn beet red. :-)
: --
: PHP Development Mailing List <http://www.php.net/>
: To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
: For additional commands, e-mail: php-dev-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net