Re: Computing and calculating dates

From: Date: Sat, 24 Mar 2007 18:42:18 +0000
Subject: Re: Computing and calculating dates
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-251291@lists.php.net to get a copy of this message
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" <travis@referable.com> wrote in message news:46054E49.4060200@referable.com... > 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) > > > > etc. Which functions are best suited for such calculations? > > > > O. Wyss > > > www.php.net/strtotime is probably a good start. > > Travis Doherty

« previous php.general (#251291) next »