Jump to content

lanu777

New Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by lanu777

  1. nice thats working, i used it like so:
     

    $adate = strtotime('2013-10-30');
    $bdate = strtotime('2013-10-31');
    $now = mktime(0,0,0);
     
    echo '<pre>';
    printf("%-15s\t%s\n", ' ', ' ');
    while ($adate < $bdate) {
        printf("%-15s\t%6d\n", 'this be how many days passed:<span>', floor(($now-$adate)/86400), '<span>' );
        $adate = strtotime('+1 days', $adate);
    }
    echo '</pre>';

    now not exactly sure how to get this  number to print to a variable - i tried this and didnot succeed:
    $howmanydayspassed =  printf("%-15s\t%6d\n", floor(($now-$adate)/86400) );

    Really appreciate your help there you are awesome!
  2. hi there trying to create a very simple date counter script here.

    I just cant recall how to do all this.

    There is a span of days starting at oct 30th, 2013 and I want to get todays date and then determine how many days have passed.

    Am I even on the right track here? Any help would be mmuch appreciated!

     

    my feeble attempt is below:

     

    <?php 

    $elvenportal = mktime(0,0,0,10,30,2011);

    $now = mktime(date("H"),date("i"),date("s"),date("n"),date("j"),date("Y"));

    $theeday = date("d")-1;

    $late = date("H");

    if ($late < 7) {$now = mktime(0,0,0,date("n"),$theeday,date("Y"));};

    if ($_POST["dayz"] != "" ){

    if ($_POST["month"] != "" ){

    if ($_POST["year"] != "" ){

    $now = mktime(0,0,0,$_POST["month"],$_POST["dayz"],$_POST["year"]);

    };};};

    $offset = $now - $elvenportal;

    print $offset;

    ?>

×
×
  • 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.