Jump to content

mikeroq

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mikeroq's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I would like to get the pear bbcode parser intergrated with pear highlighter, which supports many different languages, and would be accessable via [code=php:0] [html] [css] [js] or ect, how would I go about making the two pear scripts work together to make a bbcode parser that supports code highlighting with line numbers in form of the table.
  2. nevermind, delete topic, i just moved them to a different area
  3. mikeroq

    Dates

    wait a min, why was I doing regular dates anyway!, almost everything on my site uses the unix time stamp, hahahahahahahaha. thats what midnight does to you
  4. mikeroq

    Dates

    [code] function addates($date1)     {               // date1 is when it expires         $date2 = date("n/j/Y");         $date1 = explode("/",$date1);         $date2 = explode("/",$date2);         $month1 = $date1[0];         $day1 = $date1[1];         $year1 = $date1[2];         $month2 = $date2[0];         $day2 = $date2[1];         $year2 = $date2[2];                  if ($year1 < $year2)             {                 // if the expires year is less the current year, toss it out                 return false;             }         else if ($year1 == $year2)             {                 // if the expires year is the same as this year, then we will check month                 if ($month1 > $month2 && $year1 == $year2)                     {                                         // if the current month is before the expired month, and the year is the same, go ahead                         return true;                                                                                                }                 else if ($month1 < $month2 && $year1 == $year2)                     {                         // if the current month is after the expired month, toss it out                         return false;                     }                 else if ($month1 == $month2 && $year1 == $year2)                     {                         // check to see if day is before or after current                         if ($day1 = $day2 || $day1 > $day2)                             {                                 return true;                             }                         else ($day1 < $day2)                             {                                 return false;                             }                     }             }              } [/code] ive got most of it done
  5. mikeroq

    Dates

    I was wondering how I would have a function tell me if a date is before another date or after like like 3/16/05 before 3/16/06 or 3/12/06 before 4/12/06 thanks
  6. ok this no longer works, this is my code [code] function nixtime($unix)     {           if ($unix == "1129679173")             {                 return "Never";             }         else {         $unix = $unix;           $today = strtotime("today");         $yesterday = strtotime("yesterday");         $two = strtotime("2 days ago");         if ($unix < $today && $unix > $yesterday)         {                   $visit = date('g:i a', $unix );         return "Today, $visit";         }         if ($unix > $two && $unix < $yesterday)         {                   $visit = date('g:i a', $unix );         return "Yesterday, $visit";         }         else {                 $visit = date('n/j/y g:i a', $unix );         return $visit;         }            }       } [/code] [a href=\"http://mikeroq.be/?x=forum\" target=\"_blank\"]http://mikeroq.be/?x=forum[/a] or anywhere else, it willl say yesterday for today, and today for yesterday and show incorrect times like today at 6:30am when its only 4:30am server time
  7. Im trying to make a today and yesterday function for unix time stamps, i did one but i made it very wrong, it works, it just doesnt work right. I though of taking off 84600 or 86400 w/e it is, but then that presents a problem cause then it would be a rolling date, i need a function that will do this. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.