lanu777
-
Posts
4 -
Joined
-
Last visited
Posts posted by lanu777
-
-
hmm my php info says im runnning
Version 5.2.17, yet Im getting this error:
Fatal error: Call to undefined method DateTime::getTimestamp() -
I tried this and got the following error: Fatal error: Class 'DatePeriod' not found
I guess maybe this is from a newer version of php i'm working with?
What is the purpose of $bdate? I'm unclear on that.
Thanks so much for your help its much appreciated!
-
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;?>
creating a simple date counter
in PHP Coding Help
Posted
nice thats working, i used it like so:
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!