Re: SOLVED: Calendar Date Help
| From: | Mark Weaver | Date: | Thu, 29 May 2008 16:16:37 +0000 |
| Subject: | Re: SOLVED: Calendar Date Help | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274820@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
:P indeed you did... it just took me a while before it dawned on me. I just wasn't seeing it until the "Mule" got tired of trying to climb a vertical cliff!function setCal($h=0,$m=0,$s=0,$offset,$dayVal=1){I don't really want to say "I told you so", but that's one of the two lines I denoted as incorrect in my first response ;)$stamp = date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y'))); ^^^^^^^^
The particular block of code you're referring to definitely needs to be "re factored", however at the moment I don't know enough about php to accomplish that. I think one of the bad habits I got into early on was coding verbosely so I wouldn't have to comment as much. That definitely doesn't serve very well at times. -- Mark ------------------------- the rule of law is good, however the rule of tyrants just plain sucks! Real Tax Reform begins with getting rid of the IRS. ============================================== Powered by CentOS5 (RHEL5)Thank you Robert for the push to seriously scrutinize my code.It's far more important to learn to build complex code from simple code, than to try and understand complex code and then refactor it to simple code. Just a thought for the future since as it stands you have a very convoluted system of moving back and forth between months. Cheers, Rob.