Re: getting funny error on working page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 15, 2008 at 5:24 PM, John A DAVIS <John.A.Davis@xxxxxxxxxxx> wrote:
>
>
> Thanks! My guess is the production server has this set correctly and I will
> follow your advice.
> However, how would one do away with this error? What would I do to guarantee
> an string being returned instead of a date? What can I wrap the date()
> function in?
>
>
>    $month=substr($thisdate,0,2);
>    $day =substr($thisdate,3,2);
>    $year = substr($thisdate,6,4);
>
>    $d =date("M d (D)",Mktime(0,0,0,$month,$day,$year));

    Sorry, my Xorg crashed.  A word of wisdom: don't try the new
Compiz-Fusion on KDE with dual-headed setups yet.  Let the bugs get
worked out first (or risk having a conspicuous hole in the wall the
size of your forehead like I will in a few days).

    To your issue:
        * What are you passing to parameter #1 of fMakeWideDate()
(then dubbed $thisdate)?
        * Mktime() should be mktime().  It'll still work, but for
cleanliness, it's a recommendation.

    When I run the function like so, it works without fail:
<?php
echo fMakeWideDate(date("m/d/Y"),1)."\n";
echo fMakeWideDate(date("m-d-Y"),1)."\n";
echo fMakeWideDate(date("Y/m/d"),2)."\n";
echo fMakeWideDate(date("Y.m.d"),2)."\n";
?>

    Are you correctly passing the date? What do you see when you echo
out the MySQL rows?

-- 
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux