tag:blogger.com,1999:blog-5698794357749867811.post8810738633191071050..comments2023-10-22T08:52:55.102-07:00Comments on Web Development Online: Nr of days - Date Function PHPcy21http://www.blogger.com/profile/01950686621783138760noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5698794357749867811.post-56842301657921766962008-10-29T05:17:00.000-07:002008-10-29T05:17:00.000-07:00Still looks like overkill when you could just do:d...Still looks like overkill when you could just do:<BR/><BR/>date('Y-m-d', strtotime('+30 day'));<BR/><BR/>Or am I missing something?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5698794357749867811.post-75747253079659388372008-02-19T03:55:00.000-08:002008-02-19T03:55:00.000-08:00No syndi it isn't overkill - and the reasons are m...No syndi it isn't overkill - and the reasons are many fold...<BR/><BR/>(i) A mySQl query may be undesirable for performance reasons<BR/>(ii) A sql database may not be available at all.<BR/>(iii) The mysql function you provide returns a specific date which may not be the required output - further (php) processing would then be required to format it to X years, X months, X days (for example)<BR/>(iv) This list could go on for quite a while and this is infact a perfect solution for a small project i'm on at the moment!<BR/>(v) Thank-you author great work!<BR/>(vi) See you later code to burn :)<BR/>(vii) Posted a anon cos i'm busy - not to hide :)~Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5698794357749867811.post-75870797145689108042007-12-07T20:44:00.000-08:002007-12-07T20:44:00.000-08:00Is it just me or is this function a bit overkill.C...Is it just me or is this function a bit overkill.<BR/>Couldn't you just use the mysql function <BR/><I>DATE_ADD('2007-12-08', INTERVAL 10 DAY)</I><BR/><BR/>To return the new date.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5698794357749867811.post-69778878812127835842007-06-11T02:52:00.000-07:002007-06-11T02:52:00.000-07:00um...yes there are... :Dum...yes there are... :Dcy21https://www.blogger.com/profile/01950686621783138760noreply@blogger.comtag:blogger.com,1999:blog-5698794357749867811.post-60868927093882325572007-06-11T01:49:00.000-07:002007-06-11T01:49:00.000-07:00There are some CSS style declarations mixed with t...There are some CSS style declarations mixed with the code of the function.zbroxhttps://www.blogger.com/profile/02632039324439385773noreply@blogger.com