Re: [PHP] Computing and calculating dates

2007-03-26 Thread Richard Lynch
On Sun, March 25, 2007 12:46 pm, Otto Wyss wrote: > Sorry that doesn't work with dates like "1.4.2007". list($d, $m, $y) = explode('.', '1.4.2007'); $unixtime = mktime(1, 0, 0, $m, $d, $y); -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. h

Re: [PHP] Computing and calculating dates

2007-03-25 Thread Otto Wyss
rday, March 24, 2007 4:37 PM To: php-general@lists.php.net Subject: Re: [PHP] Computing and calculating dates Travis Doherty wrote: Otto Wyss wrote: local_formated_date + 7; // days local_formated_date > local_formated_first_day_next_month; local_formated_date > (current_date +

RE: [PHP] Computing and calculating dates

2007-03-24 Thread Jake McHenry
u could explode that back into mktime, or just into a string. There are many ways to do what your asking :) Jake > -Original Message- > From: Otto Wyss [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 24, 2007 4:37 PM > To: php-general@lists.php.net > Subject: Re: [PHP

Re: [PHP] Computing and calculating dates

2007-03-24 Thread Otto Wyss
Travis Doherty wrote: Otto Wyss wrote: local_formated_date + 7; // days local_formated_date > local_formated_first_day_next_month; local_formated_date > (current_date + 14) etc. Which functions are best suited for such calculations? O. Wyss www.php.net/strtotime is probably a good star

Re: [PHP] Computing and calculating dates

2007-03-24 Thread itoctopus
In case you're doing so only for database update/check, then you can use mysql's built-in date_add function. In case you really want it in PHP, then here's a link simultating: http://news.hping.org/comp.lang.php.archive/10638.html -- itoctopus - http://www.itoctopus.com "Travis Doherty" <[EMAIL

Re: [PHP] Computing and calculating dates

2007-03-24 Thread Travis Doherty
Otto Wyss wrote: > This probably has been asked several times yet I can't find a > satisfying solution. What's the simplest way to compute dates like > > local_formated_date + 7; // days > local_formated_date > local_formated_first_day_next_month; > local_formated_date > (current_date + 14)