note 77506 modified in function.time by danbrown

From: Date: Sun, 20 Jul 2008 04:12:59 +0000
Subject: note 77506 modified in function.time by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142118@lists.php.net to get a copy of this message
I did an article on floating point time you can download from my website. Roun movements is the radial ounion movement and there is a quantum ounion movement as well, this code will generate the data for http://www.chronolabs.org.au/bin/roun-time-article.pdf which is an article on floating point time, I have created the calendar system as well for this time. It is compatible with other time and other solar systems with different revolutions of the planets as well as different quantumy stuff. Thanks: <?php if ($gmt>0){ $gmt=-$gmt; } else { $gmt=$gmt+$gmt+$gmt; } $ptime = strtotime('2008-05-11 10:05 AM')+(60*60*gmt); $weight = -20.22222222223+(1*gmt); $roun_xa = ($tme)/(24*60*60); $roun_ya = $ptime/(24*60*60); $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999); $nonedeficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30), "seq3" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq4" => array(31,30,31,30,30,30,31,30,31,30,31,30)); $deficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30), "seq3" => array(31,30,31,30,31,30,31,30,30,30,31,30), "seq4" => array(30,30,31,30,31,30,31,30,31,30,31,30)); $monthusage = isset($_GET['deficienty']) ? ${$_GET['deficienty']} : $deficient; foreach($monthusage as $key => $item){ $i++; foreach($item as $numdays){ $ttl_num=$ttl_num+$numdays; } } $revolutionsperyear = $ttl_num / $i; $numyears = round((round(ceil($roun)) / $revolutionsperyear),0); $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1))); while($month==0){ $day=0; foreach($monthusage as $key => $item){ $t++; $u=0; foreach($item as $numdays){ if ($ii<abs($roun)){ $isbelow=true; } $ii=$ii+$numdays; if ($ii>abs($roun)){ $isabove=true; } if ($isbelow==true&&$isabove==true){ $daynum = floor(($ii-$numday)-abs($roun)); $month = $u; $month++; $isbelow=false; $isabove=false; $nodaycount=true; } if ($nodaycount==false) $day++; $u++; } } } $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1); $roun_out= $numyears.'-'.$month.'-'.$daynum.' '.$day.".$timer"; ?> --was-- I did an article on floating point time you can download from my website. Roun movements is the radial ounion movement and there is a quantum ounion movement as well, this code will generate the data for http://www.chronolabs.org.au/bin/roun-time-article.pdf which is an article on floating point time, I have created the calendar system as well for this time. It is compatible with other time and other solar systems with different revolutions of the planets as well as different quantumy stuff. Thanks: <? if ($gmt>0){ $gmt=-$gmt; } else { $gmt=$gmt+$gmt+$gmt; } $ptime = strtotime('2008-05-11 10:05 AM')+(60*60*gmt); $weight = -20.22222222223+(1*gmt); $roun_xa = ($tme)/(24*60*60); $roun_ya = $ptime/(24*60*60); $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999); $nonedeficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30), "seq3" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq4" => array(31,30,31,30,30,30,31,30,31,30,31,30)); $deficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30), "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30), "seq3" => array(31,30,31,30,31,30,31,30,30,30,31,30), "seq4" => array(30,30,31,30,31,30,31,30,31,30,31,30)); $monthusage = isset($_GET['deficienty']) ? ${$_GET['deficienty']} : $deficient; foreach($monthusage as $key => $item){ $i++; foreach($item as $numdays){ $ttl_num=$ttl_num+$numdays; } } $revolutionsperyear = $ttl_num / $i; $numyears = round((round(ceil($roun)) / $revolutionsperyear),0); $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1))); while($month==0){ $day=0; foreach($monthusage as $key => $item){ $t++; $u=0; foreach($item as $numdays){ if ($ii<abs($roun)){ $isbelow=true; } $ii=$ii+$numdays; if ($ii>abs($roun)){ $isabove=true; } if ($isbelow==true&&$isabove==true){ $daynum = floor(($ii-$numday)-abs($roun)); $month = $u; $month++; $isbelow=false; $isabove=false; $nodaycount=true; } if ($nodaycount==false) $day++; $u++; } } } $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1); $roun_out= $numyears.'-'.$month.'-'.$daynum.' '.$day.".$timer"; ?> http://php.net/manual/en/function.time.php

« previous php.notes (#142118) next »