Re: Computing and calculating dates
| From: | Otto Wyss | Date: | Sun, 25 Mar 2007 17:46:04 +0000 |
| Subject: | Re: Computing and calculating dates | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251335@lists.php.net to get a copy of this message | ||
Sorry that doesn't work with dates like "1.4.2007".
O. Wyss
Jake McHenry wrote:
Change it to the format strtotime needs? Not hard.... Or mktime(0, 0, 0, date("m", $date), date("d", $date)+7, date("Y", $date)); for +7 days... Same with + 14 days.... Strtotime is usefull, you can just put first day next month and it just works... Lol... Then you 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:otto.wyss@orpatec.ch] Sent: Saturday, 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:Thanks, strtotime isn't able to parse a european formatted date (dd.mm.yyyy). How do I get the timestamp of such a date? O. Wyss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date: 3/23/2007 3:27 PMlocal_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. Wysswww.php.net/strtotime is probably a good start.