AustNet AustNet Archive Project — IRC Logs
« All channels | Contribute a log »

// #php — 2011-04-28

1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
03:07:08 Quit: cej ([email protected]) Quit:
03:17:29 Join: cej ([email protected]) to #php
03:18:20 Quit: cej ([email protected]) Quit:
03:18:27 Join: cej ([email protected]) to #php
03:18:27 Quit: cej ([email protected]) Excess flood
03:18:35 Join: cej ([email protected]) to #php
03:18:35 Quit: cej ([email protected]) Excess flood
03:18:39 Join: cej ([email protected]) to #php
03:22:58 <cej> <?php
03:22:58 <cej> class HijriCalendar
03:22:58 <cej> {
03:22:58 <cej> function monthName($i) // $i = 1..12
03:22:58 <cej> static $month = array("Muharram ul Haram", "Safar", "Rabi' al-awwal", "Rabi' al-akhir",
03:22:58 <cej> "Jumada al-awwal", "Jumada al-akhir", "Rajab", "Sha'aban",
03:22:58 <cej> "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah");
03:22:58 <cej> return $month[$i-1];
03:22:58 <cej> }
03:22:58 <cej> function GregorianToHijri($time = null)
03:22:58 <cej> if ($time === null) $time = time();
03:22:58 <cej> $m = date('m', $time);
03:22:58 <cej> $d = date('d', $time);
03:22:58 <cej> $y = date('Y', $time);
03:22:58 <cej> return HijriCalendar::JDToHijri(
03:22:58 <cej> cal_to_jd(CAL_GREGORIAN, $m, $d, $y));
03:22:58 <cej> function HijriToGregorian($m, $d, $y)
03:22:58 <cej> return jd_to_cal(CAL_GREGORIAN,
03:22:58 <cej> HijriCalendar::HijriToJD($m, $d, $y));
03:22:58 <cej> # Julian Day Count To Hijri
03:22:58 <cej> function JDToHijri($jd)
03:22:58 <cej> $jd = $jd - 1948440 + 10632;
03:22:58 <cej> $n = (int)(($jd - 1) / 10631);
03:22:58 <cej> $jd = $jd - 10631 * $n + 354;
03:22:58 <cej> $j = ((int)((10985 - $jd) / 5316)) *
03:22:58 <cej> ((int)(50 * $jd / 17719)) +
03:22:58 <cej> ((int)($jd / 5670)) *
03:22:58 <cej> ((int)(43 * $jd / 15238));
03:22:58 <cej> $jd = $jd - ((int)((30 - $j) / 15)) *
03:22:58 <cej> ((int)((17719 * $j) / 50)) -
03:22:58 <cej> ((int)($j / 16)) *
03:22:58 <cej> ((int)((15238 * $j) / 43)) + 29;
03:22:58 <cej> $m = (int)(24 * $jd / 709);
03:22:58 <cej> $d = $jd - (int)(709 * $m / 24);
03:22:58 <cej> $y = 30*$n + $j - 30;
03:22:58 <cej> return array($m, $d, $y);
03:22:58 <cej> # Hijri To Julian Day Count
03:22:58 <cej> function HijriToJD($m, $d, $y)
03:22:58 <cej> return (int)((11 * $y + 3) / 30) +
03:22:58 <cej> 354 * $y + 30 * $m -
03:22:58 <cej> (int)(($m - 1) / 2) + $d + 1948440 - 385;
03:22:58 <cej> };
03:22:58 <cej> function JapaneseCalendar($unix_time, $gmt, $monthsystem = 0, $poffset = 'NOW', $pweight = 0)
03:22:58 <cej> $tme = $unix_time;
03:22:58 <cej> if ($gmt>0){
03:22:58 <cej> $gmt=-$gmt;
03:22:58 <cej> } else {
03:22:58 <cej> $gmt=abs($gmt);
03:22:58 <cej> if ($poffset == 'NOW') {
03:22:58 <cej> $diff = 0+(60*60*$gmt);
03:22:58 <cej> } else {
03:22:58 <cej> $diff = abs(time()-strtotime($poffset))+(60*60*$gmt);
03:22:58 <cej> }
03:22:58 <cej>
03:22:58 <cej> $roun = (($unix_time - $diff) - $pweight);
03:22:58 <cej> $months[0]['name'] = array( 'ichigatsu','nigatsu','sangatsu',
03:22:58 <cej> 'shigatsu','gogatsu','rokugatsu',
03:22:58 <cej> 'shichigatsu','hachigatsu','kugatsu',
03:22:58 <cej> 'jugatsu','juichigatsu','junigatsu');
03:22:58 <cej>
03:22:58 <cej> $months[0]['cause'] = array( 'first month',
03:22:58 <cej> 'second month',
03:22:58 <cej> 'third month',
03:22:58 <cej> 'forth month',
03:22:58 <cej> 'fifth month',
03:22:58 <cej> 'six month',
03:22:58 <cej> 'seventh month',
03:22:58 <cej> 'eighth month',
03:22:58 <cej> 'ninth month',
03:22:58 <cej> 'tenth month',
03:22:58 <cej> 'elventh month',
03:22:58 <cej> 'twelve month');
03:22:58 <cej> $months[1]['name'] = array( 'mutsuki','kinusaragi','yayoi',
03:22:58 <cej> 'uzuki','satsuki','minatsuki',
03:22:58 <cej> 'fumizuki','hazuki','nagatsuki',
03:22:58 <cej> 'kaminazuki','shimotsuki','shiwasu');
03:22:58 <cej> $months[1]['cause'] = array( 'affection month',
03:22:58 <cej> 'changing clothes',
03:22:58 <cej> 'new life',
03:22:58 <cej> 'u-no-hana month',
03:22:58 <cej> 'fast month',
03:22:58 <cej> 'month of water',
03:22:58 <cej> 'book month',
03:22:58 <cej> 'leaf month',
03:22:58 <cej> 'long month',
03:22:58 <cej> 'month of gods',
03:22:58 <cej> 'frost month',
03:22:58 <cej> 'priests run');
03:22:58 <cej> $days['roman'] = array( 'nichiyobi','getsuyobi','kayobi',
03:22:58 <cej> 'suiyobi','mokuyobi','kin\'yobi','doyobi');
03:22:58 <cej> $days['element'] = array('Sun','Moon','Fire','Water','Wood','Gold','Earth');
03:22:58 <cej> $days['day'] = array( 'tsuitachi','futsuka','mikka','yokka','itsuka',
03:22:58 <cej> 'muika','nanoka','yoka','kokonoka','toka',
03:22:58 <cej> 'juichinichi','juninichi','jusannichi','juyokka',
03:22:58 <cej> 'jugonichi','jurokunichi','jushichinichi','juhachinichi',
03:22:58 <cej> 'jukunichi','hatsuka','nijuichinichi',
03:22:58 <cej> 'nijuninichi','nijusannichi','nijuyokka','nijugonichi',
03:22:58 <cej> 'nijurokunichi','nijushichinichi','nijuhachinichi',
03:22:58 <cej> 'nijukunichi','sanjunichi','sanjuichinichi');
03:22:59 <cej>
03:22:59 <cej> $day_count = round(($roun - strtotime('31/12/'.(intval(date('Y', $roun))-1)))/86400);
03:22:59 <cej> return array('stardate'=>date('Y', $roun).".$day_count", "date"=>$days['roman'][date('w', $roun)].' '.$days['day'][date('d', $roun)-1].' '.
03:22:59 <cej> $months[$monthsystem]['name'][date('n', $roun)-1].' '.date('Y', $roun),
03:22:59 <cej> "cause" => $days['element'][date('w', $roun)].' '.$months[$monthsystem]['cause'][date('n', $roun)-1],
03:22:59 <cej> "time" => date('h:i:s A', $roun));
03:22:59 <cej> }
03:22:59 <cej> function RounCalendar($unix_time, $gmt, $poffset = '2008-05-11 14:45:38', $pweight = '-1.599999991', $defiency='deficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:22:59 <cej> {
03:22:59 <cej> $tme = $unix_time;
03:22:59 <cej> if ($gmt>0){
03:22:59 <cej> $gmt=-$gmt;
03:22:59 <cej> } else {
03:22:59 <cej> $gmt=abs($gmt);
03:22:59 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:22:59 <cej> $weight = $pweight+(1*$gmt);
03:22:59 <cej> $roun_xa = ($tme)/(24*60*60);
03:22:59 <cej> $roun_ya = $ptime/(24*60*60);
03:22:59 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:22:59 <cej> $nonedeficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30),
03:22:59 <cej> "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq3" => array(31,30,31,30,30,30,31,30,31,30,31,30),
03:22:59 <cej> "seq4" => array(31,30,31,30,30,30,31,30,31,30,31,30));
03:22:59 <cej> $deficient = array("seq1" => array(31,30,31,30,31,30,30,30,31,30,31,30),
03:22:59 <cej> "seq3" => array(31,30,31,30,31,30,31,30,30,30,31,30),
03:22:59 <cej> "seq4" => array(30,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq5" => array(31,30,31,30,31,30,31,30,31,30,30,30),
03:22:59 <cej> "seq6" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq7" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq8" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq9" => array(30,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq10" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq11" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq12" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq13" => array(31,30,30,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq14" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq15" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:22:59 <cej> "seq16" => array(31,30,31,30,31,30,31,30,31,30,31,30));
03:22:59 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:22:59 <cej> foreach($monthusage as $key => $item){
03:22:59 <cej> $i++;
03:22:59 <cej> foreach($item as $numdays){
03:22:59 <cej> $ttl_num=$ttl_num+$numdays;
03:22:59 <cej> $ttl_num_months++;
03:22:59 <cej> $revolutionsperyear = $ttl_num / $i;
03:22:59 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:22:59 <cej> $avg_num_month = $ttl_num_months/$i;
03:22:59 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:22:59 <cej> while($month==0){
03:22:59 <cej> $day=0;
03:22:59 <cej> $u=0;
03:22:59 <cej> $t=0;
03:22:59 <cej> $t++;
03:22:59 <cej> $tt=0;
03:22:59 <cej> for($sh=1;$sh<=$numdays;$sh++){
03:22:59 <cej> $ii=$ii+1;
03:22:59 <cej> $tt++;
03:22:59 <cej> if ($ii==floor($jtl)){
03:22:59 <cej> if ($roun<0){
03:22:59 <cej> $daynum = $tt;
03:22:59 <cej> $month = $t;
03:22:59 <cej> $daynum = $numdays-($tt-1);
03:22:59 <cej> $month = $avg_num_month-($t-1);
03:22:59 <cej> $sequence = $key;
03:22:59 <cej> $nodaycount=true;
03:22:59 <cej> if ($nodaycount==false)
03:22:59 <cej> $day++;
03:22:59 <cej> $u++;
03:22:59 <cej> $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1);
03:22:59 <cej> $roun_out= $numyears.'/'.$month.'/'.$daynum.' '.$day.'.'. floor(intval(substr($timer,0,2))/100*$timeset['hours']).':'. floor(intval(substr($timer,2,2))/100*$timeset['minutes']).':'. floor(intval(substr($timer,4,2))/100*$timeset['seconds']).'.'.substr($timer,6,strlen($timer)-6);
03:22:59 <cej> $roun_obj = array('stardate'=>"$numyears.$day", 'rounfloat' => $roun, 'year'=>$numyears,'month'=>$month, 'day'=>$daynum, 'jtl'=>$jtl, 'day_count'=>$day,'hours'=>floor(intval(substr($timer,0,2))/100*$timeset['hours']),'minute'=> floor(intval(substr($timer,2,2))/100*$timeset['minutes']),'seconds'=> floor(intval(substr($timer,4,2))/100*$timeset['seconds']),'microtime'=>substr($timer,6,strlen($ti
03:22:59 <cej> mer)-6),'strout'=>$roun_out);
03:22:59 <cej> return $roun_obj;
03:22:59 Quit: cej ([email protected]) Excess flood
03:23:04 Join: cej ([email protected]) to #php
03:23:05 Quit: cej ([email protected]) Excess flood
03:23:09 Join: cej ([email protected]) to #php
03:23:30 <cej> class HijriCalendar
03:23:30 <cej> {
03:23:30 <cej> function monthName($i) // $i = 1..12
03:23:30 <cej> static $month = array("Muharram ul Haram", "Safar", "Rabi' al-awwal", "Rabi' al-akhir",
03:23:30 <cej> "Jumada al-awwal", "Jumada al-akhir", "Rajab", "Sha'aban",
03:23:30 <cej> "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah");
03:23:30 <cej> return $month[$i-1];
03:23:30 <cej> }
03:23:30 <cej> function GregorianToHijri($time = null)
03:23:30 <cej> if ($time === null) $time = time();
03:23:30 <cej> $m = date('m', $time);
03:23:30 <cej> $d = date('d', $time);
03:23:30 <cej> $y = date('Y', $time);
03:23:30 <cej> return HijriCalendar::JDToHijri(
03:23:30 <cej> cal_to_jd(CAL_GREGORIAN, $m, $d, $y));
03:23:30 <cej> function HijriToGregorian($m, $d, $y)
03:23:30 <cej> return jd_to_cal(CAL_GREGORIAN,
03:23:30 <cej> HijriCalendar::HijriToJD($m, $d, $y));
03:23:30 <cej> # Julian Day Count To Hijri
03:23:30 <cej> function JDToHijri($jd)
03:23:30 <cej> $jd = $jd - 1948440 + 10632;
03:23:30 <cej> $n = (int)(($jd - 1) / 10631);
03:23:30 <cej> $jd = $jd - 10631 * $n + 354;
03:23:30 <cej> $j = ((int)((10985 - $jd) / 5316)) *
03:23:30 <cej> ((int)(50 * $jd / 17719)) +
03:23:30 <cej> ((int)($jd / 5670)) *
03:23:30 <cej> ((int)(43 * $jd / 15238));
03:23:30 <cej> $jd = $jd - ((int)((30 - $j) / 15)) *
03:23:30 <cej> ((int)((17719 * $j) / 50)) -
03:23:30 <cej> ((int)($j / 16)) *
03:23:30 <cej> ((int)((15238 * $j) / 43)) + 29;
03:23:30 <cej> $m = (int)(24 * $jd / 709);
03:23:30 <cej> $d = $jd - (int)(709 * $m / 24);
03:23:30 <cej> $y = 30*$n + $j - 30;
03:23:30 <cej> return array($m, $d, $y);
03:23:30 <cej> # Hijri To Julian Day Count
03:23:30 <cej> function HijriToJD($m, $d, $y)
03:23:30 <cej> return (int)((11 * $y + 3) / 30) +
03:23:30 <cej> 354 * $y + 30 * $m -
03:23:30 <cej> (int)(($m - 1) / 2) + $d + 1948440 - 385;
03:23:30 <cej> };
03:23:45 <cej> function JapaneseCalendar($unix_time, $gmt, $monthsystem = 0, $poffset = 'NOW', $pweight = 0)
03:23:45 <cej> {
03:23:45 <cej> $tme = $unix_time;
03:23:45 <cej> if ($gmt>0){
03:23:45 <cej> $gmt=-$gmt;
03:23:45 <cej> } else {
03:23:45 <cej> $gmt=abs($gmt);
03:23:45 <cej> }
03:23:45 <cej> if ($poffset == 'NOW') {
03:23:45 <cej> $diff = 0+(60*60*$gmt);
03:23:45 <cej> } else {
03:23:45 <cej> $diff = abs(time()-strtotime($poffset))+(60*60*$gmt);
03:23:45 <cej> }
03:23:45 <cej>
03:23:45 <cej> $roun = (($unix_time - $diff) - $pweight);
03:23:45 <cej> $months[0]['name'] = array( 'ichigatsu','nigatsu','sangatsu',
03:23:45 <cej> 'shigatsu','gogatsu','rokugatsu',
03:23:45 <cej> 'shichigatsu','hachigatsu','kugatsu',
03:23:45 <cej> 'jugatsu','juichigatsu','junigatsu');
03:23:45 <cej>
03:23:45 <cej> $months[0]['cause'] = array( 'first month',
03:23:45 <cej> 'second month',
03:23:45 <cej> 'third month',
03:23:45 <cej> 'forth month',
03:23:45 <cej> 'fifth month',
03:23:45 <cej> 'six month',
03:23:45 <cej> 'seventh month',
03:23:45 <cej> 'eighth month',
03:23:45 <cej> 'ninth month',
03:23:45 <cej> 'tenth month',
03:23:45 <cej> 'elventh month',
03:23:45 <cej> 'twelve month');
03:23:45 <cej> $months[1]['name'] = array( 'mutsuki','kinusaragi','yayoi',
03:23:45 <cej> 'uzuki','satsuki','minatsuki',
03:23:45 <cej> 'fumizuki','hazuki','nagatsuki',
03:23:45 <cej> 'kaminazuki','shimotsuki','shiwasu');
03:23:45 <cej> $months[1]['cause'] = array( 'affection month',
03:23:45 <cej> 'changing clothes',
03:23:45 <cej> 'new life',
03:23:45 <cej> 'u-no-hana month',
03:23:45 <cej> 'fast month',
03:23:45 <cej> 'month of water',
03:23:45 <cej> 'book month',
03:23:45 <cej> 'leaf month',
03:23:45 <cej> 'long month',
03:23:45 <cej> 'month of gods',
03:23:45 <cej> 'frost month',
03:23:45 <cej> 'priests run');
03:23:45 <cej> $days['roman'] = array( 'nichiyobi','getsuyobi','kayobi',
03:23:45 <cej> 'suiyobi','mokuyobi','kin\'yobi','doyobi');
03:23:45 <cej> $days['element'] = array('Sun','Moon','Fire','Water','Wood','Gold','Earth');
03:23:45 <cej> $days['day'] = array( 'tsuitachi','futsuka','mikka','yokka','itsuka',
03:23:45 <cej> 'muika','nanoka','yoka','kokonoka','toka',
03:23:45 <cej> 'juichinichi','juninichi','jusannichi','juyokka',
03:23:45 <cej> 'jugonichi','jurokunichi','jushichinichi','juhachinichi',
03:23:45 <cej> 'jukunichi','hatsuka','nijuichinichi',
03:23:45 <cej> 'nijuninichi','nijusannichi','nijuyokka','nijugonichi',
03:23:45 <cej> 'nijurokunichi','nijushichinichi','nijuhachinichi',
03:23:45 <cej> 'nijukunichi','sanjunichi','sanjuichinichi');
03:23:45 <cej> $day_count = round(($roun - strtotime('31/12/'.(intval(date('Y', $roun))-1)))/86400);
03:23:45 <cej> return array('stardate'=>date('Y', $roun).".$day_count", "date"=>$days['roman'][date('w', $roun)].' '.$days['day'][date('d', $roun)-1].' '.
03:23:45 <cej> $months[$monthsystem]['name'][date('n', $roun)-1].' '.date('Y', $roun),
03:23:45 <cej> "cause" => $days['element'][date('w', $roun)].' '.$months[$monthsystem]['cause'][date('n', $roun)-1],
03:23:45 <cej> "time" => date('h:i:s A', $roun));
03:23:57 <cej> function RounCalendar($unix_time, $gmt, $poffset = '2008-05-11 14:45:38', $pweight = '-1.599999991', $defiency='deficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:23:57 <cej> {
03:23:57 <cej> $tme = $unix_time;
03:23:57 <cej> if ($gmt>0){
03:23:57 <cej> $gmt=-$gmt;
03:23:57 <cej> } else {
03:23:57 <cej> $gmt=abs($gmt);
03:23:57 <cej> }
03:23:57 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:23:58 <cej> $weight = $pweight+(1*$gmt);
03:23:58 <cej> $roun_xa = ($tme)/(24*60*60);
03:23:58 <cej> $roun_ya = $ptime/(24*60*60);
03:23:58 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:23:58 <cej> $nonedeficient = array("seq1" => array(31,30,31,30,30,30,31,30,31,30,31,30),
03:23:58 <cej> "seq2" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq3" => array(31,30,31,30,30,30,31,30,31,30,31,30),
03:23:58 <cej> "seq4" => array(31,30,31,30,30,30,31,30,31,30,31,30));
03:23:58 <cej> $deficient = array("seq1" => array(31,30,31,30,31,30,30,30,31,30,31,30),
03:23:58 <cej> "seq3" => array(31,30,31,30,31,30,31,30,30,30,31,30),
03:23:58 <cej> "seq4" => array(30,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq5" => array(31,30,31,30,31,30,31,30,31,30,30,30),
03:23:58 <cej> "seq6" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq7" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq8" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq9" => array(30,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq10" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq11" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq12" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq13" => array(31,30,30,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq14" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq15" => array(31,30,31,30,31,30,31,30,31,30,31,30),
03:23:58 <cej> "seq16" => array(31,30,31,30,31,30,31,30,31,30,31,30));
03:23:58 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:23:58 <cej> foreach($monthusage as $key => $item){
03:23:58 <cej> $i++;
03:23:58 <cej> foreach($item as $numdays){
03:23:58 <cej> $ttl_num=$ttl_num+$numdays;
03:23:58 <cej> $ttl_num_months++;
03:23:58 <cej> }
03:23:58 <cej> $revolutionsperyear = $ttl_num / $i;
03:23:58 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:23:58 <cej> $avg_num_month = $ttl_num_months/$i;
03:23:58 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:23:58 <cej> while($month==0){
03:23:58 <cej> $day=0;
03:23:58 <cej> $u=0;
03:23:58 <cej> $t=0;
03:23:58 <cej> $t++;
03:23:58 <cej> $tt=0;
03:23:58 <cej> for($sh=1;$sh<=$numdays;$sh++){
03:23:58 <cej> $ii=$ii+1;
03:23:58 <cej> $tt++;
03:23:58 Quit: cej ([email protected]) Excess flood
03:24:02 Join: cej ([email protected]) to #php
03:24:15 <cej> function BuddhistCalendar($unix_time, $gmt, $poffset = '1970-03-10 12:00 PM', $pweight = '-960995.7712501', $defiency='nonedeficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:24:15 <cej> {
03:24:15 <cej> $tme = $unix_time;
03:24:15 <cej> if ($gmt>0){
03:24:15 <cej> $gmt=-$gmt;
03:24:15 <cej> } else {
03:24:15 <cej> $gmt=abs($gmt);
03:24:15 <cej> }
03:24:15 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:24:15 <cej> $weight = $pweight+(1*$gmt);
03:24:15 <cej> $roun_xa = ($tme)/(24*60*60);
03:24:15 <cej> $roun_ya = $ptime/(24*60*60);
03:24:15 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:24:15 <cej> $nonedeficient = array("seq1" => array(29,30,29,30,29,30,29,30,29,30,29,30),
03:24:15 <cej> "seq2" => array(29,30,30,30,30,29,30,29,30,29,30,29,30),
03:24:15 <cej> "seq3" => array(29,30,29,30,29,30,29,30,29,30,29,30));
03:24:15 <cej> $monthnames = array("seq1" => array('Tagu','Kason','Waso','Wagaung','Tawthalin',
03:24:15 <cej> 'Thadingyut','Tazaungmon','Natdaw','Pyatho',
03:24:15 <cej> 'Tabodwe','Tabaung'),
03:24:15 <cej> "seq2" => array('Tagu','Kason','1st Waso','2nd Waso','Wagaung','Tawthalin',
03:24:15 <cej> "seq3" => array('Tagu','Kason','Waso','Wagaung','Tawthalin',
03:24:15 <cej> 'Tabodwe','Tabaung'));
03:24:15 <cej>
03:24:15 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:24:15 <cej> foreach($monthusage as $key => $item){
03:24:15 <cej> $i++;
03:24:15 <cej> foreach($item as $numdays){
03:24:15 <cej> $ttl_num=$ttl_num+$numdays;
03:24:15 <cej> $ttl_num_months++;
03:24:15 <cej> // As well as Function MayanTihkalCalendar
03:24:15 <cej> $revolutionsperyear = $ttl_num / $i;
03:24:15 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:24:15 <cej> $avg_num_month = $ttl_num_months/$i;
03:24:15 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:24:15 <cej> while($month==0){
03:24:15 <cej> $day=0;
03:24:15 <cej> $u=0;
03:24:15 <cej> foreach($monthusage as $key => $item){
03:24:15 <cej> $t=0;
03:24:15 <cej> foreach($item as $numdays){
03:24:15 <cej> $t++;
03:24:15 <cej> $tt=0;
03:24:15 <cej> for($sh=1;$sh<=$numdays;$sh++){
03:24:15 <cej> $ii=$ii+1;
03:24:15 <cej> $tt++;
03:24:15 <cej> if ($ii==floor($jtl)){
03:24:15 <cej> if ($roun<0){
03:24:15 <cej> $daynum = floor($tt);
03:24:15 <cej> $month = floor($t);
03:24:15 <cej> } else {
03:24:15 <cej> $daynum = floor($numdays-($tt-1));
03:24:15 <cej> $month = floor($avg_num_month-($t-1));
03:24:15 <cej> }
03:24:15 <cej> $sequence = $key;
03:24:15 <cej> $nodaycount=true;
03:24:15 <cej> }
03:24:15 <cej> }
03:24:15 <cej> if ($nodaycount==false)
03:24:15 <cej> $day++;
03:24:15 <cej> }
03:24:15 <cej> $u++;
03:24:15 <cej> }
03:24:15 <cej> }
03:24:15 <cej> //$numyears = abs($numyears);
03:24:15 <cej>
03:24:15 <cej> $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1);
03:24:15 <cej> $roun_out= $numyears.'/'.$month.'/'.$daynum.' '.$day.'.'. floor(intval(substr($timer,0,2))/100*$timeset['hours']).':'. floor(intval(substr($timer,2,2))/100*$timeset['minutes']).':'. floor(intval(substr($timer,4,2))/100*$timeset['seconds']).'.'.substr($timer,6,strlen($timer)-6);
03:24:15 <cej> $roun_obj = array('stardate'=>"$numyears.$day", 'year'=>$numyears,'month'=>$month, 'mname' => $monthnames[$sequence][$month-1],'day'=>$daynum, 'jtl'=>$jtl, 'day_count'=>$day,'hours'=>floor(intval(substr($timer,0,2))/100*$timeset['hours']),'minute'=> floor(intval(substr($timer,2,2))/100*$timeset['minutes']),'seconds'=> floor(intval(substr($timer,4,2))/100*$timeset['seconds']),'microtime'=>sub
03:24:15 <cej> str($timer,6,strlen($timer)-6),'strout'=>$roun_out);
03:24:15 <cej> return $roun_obj;
03:24:16 <cej> }
03:24:34 <cej> function VedicCalendar($unix_time, $gmt, $poffset = '1970-01-12 12:00 PM', $pweight = '-49183.75', $defiency='deficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:24:34 <cej> {
03:24:34 <cej> $tme = $unix_time;
03:24:34 <cej> if ($gmt>0){
03:24:34 <cej> $gmt=-$gmt;
03:24:34 <cej> } else {
03:24:34 <cej> $gmt=abs($gmt);
03:24:34 <cej> }
03:24:34 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:24:34 <cej> $weight = $pweight+(1*$gmt);
03:24:34 <cej> $roun_xa = ($tme)/(24*60*60);
03:24:34 <cej> $roun_ya = $ptime/(24*60*60);
03:24:34 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:24:34 <cej> $deficient = array( "seq1" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq2" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq3" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq4" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq5" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq6" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq7" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq8" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq9" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq10" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq11" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq12" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq13" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq14" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq15" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq16" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq17" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq18" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq19" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq20" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq21" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq22" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq23" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq24" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq25" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq26" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq27" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq28" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq29" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq30" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq31" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq32" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq33" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq34" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq35" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq36" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq37" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq38" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq39" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq40" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq41" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq42" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq43" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq44" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq45" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq46" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq47" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq48" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq49" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq50" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq51" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq52" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq53" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq54" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq55" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq56" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq57" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq58" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq59" => array(27,27,27,27,27,27,27,27,27,27,27,27),
03:24:34 <cej> "seq60" => array(27,27,27,27,27,27,27,27,27,27,27,27));
03:24:35 <cej> $daynames = array( 'Vishkumbha','Prīti','Āyushmān','Saubhāgya','Shobhana',
03:24:35 <cej> 'Atiganda','Sukarman','Dhriti','Shūla','Ganda','Vriddhi',
03:24:35 <cej> 'Dhruva', 'Vyāghāta', 'Harshana', 'Vajra', 'Siddhi', 'Vyatīpāta',
03:24:35 <cej> 'Varigha', 'Parigha', 'Shiva', 'Siddha', 'Sādhya', 'Shubha',
03:24:35 <cej> 'Shukla', 'Brāhma', 'Māhendra', 'Vaidhriti');
03:24:35 <cej>
03:24:35 <cej> $monthnames = array('Chaitra', 'Vaishākh', 'Jyaishtha', 'Āshādha', 'Shrāvana',
03:24:35 <cej> 'Bhaadra', 'Āshwin', 'Kārtik', 'Agrahayana', 'Paush', 'Māgh', 'Phālgun');
03:24:35 <cej>
03:24:35 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:24:35 <cej> foreach($monthusage as $key => $item){
03:24:35 <cej> $i++;
03:24:35 <cej> foreach($item as $numdays){
03:24:35 <cej> $ttl_num=$ttl_num+$numdays;
03:24:35 <cej> $ttl_num_months++;
03:24:35 <cej> }
03:24:35 <cej> // As well as Function MayanTihkalCalendar
03:24:35 <cej> $revolutionsperyear = $ttl_num / $i;
03:24:35 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:24:35 <cej> $avg_num_month = $ttl_num_months/$i;
03:24:35 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:24:35 <cej> while($month==0){
03:24:35 <cej> $day=0;
03:24:35 <cej> $u=0;
03:24:35 <cej> foreach($monthusage as $key => $item){
03:24:35 <cej> $t=0;
03:24:35 <cej> foreach($item as $numdays){
03:24:35 Quit: cej ([email protected]) Excess flood
03:24:39 Join: cej ([email protected]) to #php
03:24:53 <cej> you can get the rest of the time codes from:
03:25:41 <cej> this is an example of the classes running
03:25:42 <cej> http://time.chronolabs.coop/
03:26:29 Quit: schnoodles ([email protected]) Ping timeout: 121 seconds
03:26:37 Join: schnoodles ([email protected]) to #php
03:27:27 <cej> here is the zip that contains the time classes and rss feed
03:27:27 <cej> http://www.chronolabs.coop/binaries/time.chronolabs.coop.1.1.zip,271.html
03:27:43 <cej> download: http://bin.chronolabs.coop/time.chronolabs.coop.1.1.zip
03:36:57 <cej> at the third click it will be 3:36:47s
03:38:03 <cej> mayan long count
03:38:30 <cej> function MayanLongCount($tme, $gmt, $pmtc, $poffset = '2012-12-21 8:24 PM', $pppo = array(13,0,0,0,0)){
03:38:30 <cej> $epoch = strtotime($poffset);
03:38:30 <cej> $diff=(($tme-$epoch)/(60*60*24));
03:38:30 <cej> $ptime = $diff+((60*60*$gmt)/(60*60*24));
03:38:30 <cej> $ppo = changemaya($pppo,ceil($ptime));
03:38:30 <cej> return array('ppo' => $ppo[0].'.'.$ppo[1].'.'.$ppo[2].'.'.$ppo[3].'.'.$ppo[4], 'stardate' => $pmtc['year'] . '.' . $ppo[4]);
03:38:30 <cej> }
03:38:30 <cej> function changemaya($ppo,$diff){
03:38:30 <cej> if ($diff>0) { $amount=1; } else { $amount=-1; }
03:38:30 <cej> for ($sh=1;$sh<abs($diff);$sh++){
03:38:30 <cej> if ($ppo[4]+$amount>20){
03:38:30 <cej> if ($ppo[3]+$amount>20){
03:38:30 <cej> if ($ppo[2]+$amount>20){
03:38:30 <cej> if ($ppo[1]+$amount>20){
03:38:30 <cej> if ($ppo[0]+$amount>20){
03:38:30 <cej> $ppo[0]=0;
03:38:30 <cej> $ppo[1]=0;
03:38:30 <cej> $ppo[2]=0;
03:38:30 <cej> $ppo[3]=0;
03:38:30 <cej> $ppo[4]=0;
03:38:30 <cej> } else {
03:38:30 <cej> $ppo[0]=$ppo[0]+$amount;
03:38:30 <cej> }
03:38:30 <cej> } else {
03:38:30 <cej> $ppo[2]=0;
03:38:30 <cej> $ppo[1]=$ppo[1]+$amount;
03:38:30 <cej> }
03:38:30 <cej> } else {
03:38:30 <cej> $ppo[3]=0;
03:38:30 <cej> $ppo[2]=$ppo[2]+$amount;
03:38:30 <cej> }
03:38:30 <cej> } else {
03:38:30 <cej> $ppo[4]=0;
03:38:30 <cej> $ppo[3]=$ppo[3]+$amount;
03:38:30 <cej> }
03:38:30 <cej> } elseif ($ppo[4]+$amount<0){
03:38:30 <cej> if ($ppo[3]+$amount<0){
03:38:30 <cej> if ($ppo[2]+$amount<0){
03:38:30 <cej> if ($ppo[1]+$amount<0){
03:38:30 <cej> if ($ppo[0]+$amount<0){
03:38:30 <cej> $ppo[0]=20;
03:38:30 <cej> $ppo[1]=20;
03:38:30 <cej> $ppo[2]=20;
03:38:30 <cej> $ppo[3]=20;
03:38:30 <cej> $ppo[4]=20;
03:38:30 <cej> } else {
03:38:30 <cej> $ppo[4]=$ppo[4]+$amount;
03:38:30 <cej> }
03:38:30 <cej> }
03:38:30 <cej> return $ppo;
03:38:30 <cej>
03:40:55 <cej> need a working decrom
03:40:56 <cej> function decrom($value){
03:40:56 <cej> $digits=array(
03:40:56 <cej> 1 => "I",
03:40:56 <cej> 4 => "IV",
03:40:56 <cej> 5 => "V",
03:40:56 <cej> 9 => "IX",
03:40:56 <cej> 10 => "X",
03:40:56 <cej> 40 => "XL",
03:40:56 <cej> 50 => "L",
03:40:56 <cej> 90 => "XC",
03:40:56 <cej> 100 => "C",
03:40:56 <cej> 400 => "CD",
03:40:56 <cej> 500 => "D",
03:40:56 <cej> 900 => "CM",
03:40:56 <cej> 1000 => "M"
03:40:56 <cej> );
03:40:56 <cej> krsort($digits);
03:40:56 <cej> foreach($digits as $key => $symbol){
03:40:56 <cej> while($value>intval($key)) {
03:40:56 <cej> $value = $value - intval($key);
03:40:56 <cej> $ret .= $symbol;
03:40:56 <cej> }
03:40:56 <cej> }
03:40:56 <cej> return $ret;
03:41:48 <cej> function RomanCalendar($unix_time, $gmt, $poffset = '1970-09-02 12:00 PM', $pweight = '-708219.75000001', $defiency='deficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:41:48 <cej> {
03:41:48 <cej> $tme = $unix_time;
03:41:48 <cej> if ($gmt>0){
03:41:48 <cej> $gmt=-$gmt;
03:41:48 <cej> } else {
03:41:48 <cej> $gmt=abs($gmt);
03:41:48 <cej> }
03:41:48 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:41:48 <cej> $weight = $pweight+(1*$gmt);
03:41:48 <cej> $roun_xa = ($tme)/(24*60*60);
03:41:48 <cej> $roun_ya = $ptime/(24*60*60);
03:41:48 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:41:48 <cej>
03:41:48 <cej> $cycle = 16;
03:41:48 <cej> $cyclemonths = array("romulus" => array(31,30,31,30,31,30,30,31,30,30));
03:41:48 <cej> $cycledepreciation = array(16 => array("romulus" => array('cycle' => 6,
03:41:48 <cej> 'scale' => array('gmt' => 0,
03:41:48 <cej> 'UP' => -9,
03:41:48 <cej> 'DN' => 9)
03:41:48 <cej> )
03:41:48 <cej> ));
03:41:48 <cej>
03:41:48 <cej> $cycledays = array(16 => 61);
03:41:48 <cej> $cyclenames = array(16 => "Nivis Off Month");
03:41:48 <cej> $cyclemonthnames = array("romulus" => array( "Martius", "Aprilis", "Mius", "Lunius", "Quintilis", "Sexitilis",
03:41:48 <cej> "Messidor", "Octobribiis", "Novembribiis", "Decembribiis"));
03:41:48 <cej> $monthnames = array();
03:41:49 <cej>
03:41:49 <cej> // Code Segment 3 Calculate Calendar Cycle Depreciation
03:41:49 <cej> if ($cycle > 0) {
03:41:49 <cej> foreach ($cyclemonths as $key => $value) {
03:41:49 <cej> if (isset($cycledepreciation[$cycle][$key])) {
03:41:49 <cej> $month = 0;
03:41:49 <cej> $monthnames[$key] = array();
03:41:49 <cej> $monthnames_tmp = array();
03:41:49 <cej> $appretite = array();
03:41:49 <cej> foreach( $value as $index => $monthday ) {
03:41:49 <cej> $month++;
03:41:49 <cej> $appretite = array_merge($appretite, array($monthday));
03:41:49 <cej> if ($month==$cycledepreciation[$cycle][$key]['cycle']) {
03:41:49 <cej> $appretite = array_merge($appretite, array($cycledays[$cycle]));
03:41:49 <cej> foreach($cyclemonthnames[$key] as $mindex => $mname) {
03:41:49 <cej> $uu++;
03:41:49 <cej> $monthnames_tmp = array_merge($monthnames_tmp, array($mname));
03:41:49 <cej> if ($uu==$cycledepreciation[$cycle][$key]['cycle'])
03:41:49 <cej> $monthnames_tmp = array_merge($monthnames_tmp, array($cyclenames[$cycle]));
03:41:49 <cej> }
03:41:49 <cej> }
03:41:49 <cej> }
03:41:49 <cej> if (isset($monthnames_tmp))
03:41:49 <cej> $monthnames[$key] = $monthnames_tmp;
03:41:49 <cej> else
03:41:49 <cej> $monthnames[$key] = $cyclemonthnames[$key];
03:41:49 <cej> }
03:41:49 <cej> if (isset($appretite))
03:41:49 <cej> $deficient[$key] = $appretite;
03:41:49 <cej> else
03:41:49 <cej> $deficient[$key] = $value;
03:41:49 <cej> }
03:41:49 <cej> } else {
03:41:49 <cej> foreach ($cyclemonths as $key => $value)
03:41:49 <cej> $deficient[$key] = $value;
03:41:49 <cej> foreach($cyclemonthnames as $key => $value)
03:41:49 <cej> $monthnames[$key] = $value;
03:41:49 <cej> }
03:41:49 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:41:49 <cej> foreach($monthusage as $key => $item){
03:41:49 <cej> $i++;
03:41:49 <cej> foreach($item as $numdays){
03:41:49 <cej> $ttl_num=$ttl_num+$numdays;
03:41:49 <cej> $ttl_num_months++;
03:41:49 <cej> }
03:41:49 <cej> $ttl_num=$ttl_num+$cycledays[$cycle];
03:41:49 <cej> $ttl_num_months++;
03:41:49 <cej> }
03:41:49 <cej> }
03:41:49 <cej>
03:41:49 <cej> $revolutionsperyear = $ttl_num / $i;
03:41:49 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:41:49 <cej> $avg_num_month = $ttl_num_months/$i;
03:41:49 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:41:49 <cej> $ii=0;
03:41:49 <cej> $tt=0;
03:41:49 <cej> $t=0;
03:41:49 <cej> $month=0;
03:41:49 <cej> while($month==0){
03:41:49 <cej> $day=0;
03:41:49 <cej> $u=0;
03:41:49 <cej> foreach($monthusage as $key => $item){
03:41:49 <cej> $t=0;
03:41:49 <cej> foreach($item as $numdays){
03:41:49 <cej> $t++;
03:41:49 <cej> $tt=0;
03:41:49 <cej> for($sh=1;$sh<=$numdays;$sh++){
03:41:49 <cej> $ii=$ii+1;
03:41:49 <cej> $tt++;
03:41:49 <cej> if ($ii==floor($jtl)){
03:41:49 <cej> if ($roun<0){
03:41:49 <cej> $daynum = $tt;
03:41:49 <cej> $month = $t;
03:41:49 <cej> } else {
03:41:49 <cej> $daynum = $numdays-($tt-1);
03:41:49 <cej> $month = $avg_num_month-($t-1);
03:41:49 <cej> $sequence = $key;
03:41:49 <cej> $nodaycount=true;
03:41:49 <cej> if ($nodaycount==false)
03:41:49 <cej> $day++;
03:41:49 <cej> $u++;
03:41:49 <cej> //$numyears = abs($numyears);
03:41:49 <cej> $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1);
03:41:49 <cej> $roun_out = decrom($numyears) . ' ' . decrom($month) . ' ' . decrom($daynum).' '.$day.'.'. floor(intval(substr($timer,0,2))/100*$timeset['hours']).':'. floor(intval(substr($timer,2,2))/100*$timeset['minutes']).':'. floor(intval(substr($timer,4,2))/100*$timeset['seconds']).'.'.substr($timer,6,strlen($timer)-6);
03:41:49 <cej> $roun_obj = array('stardate'=>"$numyears.$day", 'year'=>decrom($numyears),'month'=>decrom($month), 'mname' => $monthnames[$sequence][$month-1],'day'=>decrom($daynum), 'jtl'=>$jtl, 'day_count'=>$day,'hours'=>floor(intval(substr($timer,0,2))/100*$timeset['hours']),'minute'=> floor(intval(substr($timer,2,2))/100*$timeset['minutes']),'seconds'=> floor(intval(substr($timer,4,2))/100*$timeset['sec
03:41:49 <cej> onds']),'microtime'=>substr($timer,6,strlen($timer)-6),'strout'=>$roun_out);
03:41:49 <cej> return $roun_obj;
03:41:58 <cej> Latin Calendar
03:43:51 <cej> Egyptian Calendar over 26000 years old still works to the second...
03:43:52 <cej> function EgyptianCalendar($unix_time, $gmt, $poffset = '1970-02-26 7:45 PM', $pweight = '-9777600.22222222223', $defiency='nonedeficient', $timeset= array("hours" => 24, "minutes" => 60, "seconds" => 60))
03:43:52 <cej> {
03:43:52 <cej> $tme = $unix_time;
03:43:52 <cej> if ($gmt>0){
03:43:52 <cej> $gmt=-$gmt;
03:43:52 <cej> } else {
03:43:52 <cej> $gmt=abs($gmt);
03:43:52 <cej> }
03:43:52 <cej> $ptime = strtotime($poffset)+(60*60*$gmt);
03:43:52 <cej> $weight = $pweight+(1*$gmt);
03:43:52 <cej> $roun_xa = ($tme)/(24*60*60);
03:43:52 <cej> $roun_ya = $ptime/(24*60*60);
03:43:52 <cej> $roun = (($roun_xa -$roun_ya) - $weight)+(microtime/999999);
03:43:52 <cej> $nonedeficient = array("seq1" => array(30,30,30,30,30,30,30,30,30,30,30,30,5));
03:43:52 <cej> $monthnames = array("seq1" => array('Thoth','Phaophi','Athyr','Choiak','Tybi',
03:43:52 <cej> 'Mecheir','Phamenoth','Pharmuthi','Pachon',
03:43:52 <cej> 'Payni','Epiphi','Mesore','epagomenai'));
03:43:52 <cej>
03:43:53 <cej> $monthusage = isset($defiency) ? ${$defiency} : $deficient;
03:43:53 <cej> foreach($monthusage as $key => $item){
03:43:53 <cej> $i++;
03:43:53 <cej> foreach($item as $numdays){
03:43:53 <cej> $ttl_num=$ttl_num+$numdays;
03:43:53 <cej> $ttl_num_months++;
03:43:53 <cej> }
03:43:53 <cej> // As well as Function MayanTihkalCalendar
03:43:53 <cej> $revolutionsperyear = $ttl_num / $i;
03:43:53 <cej> $numyears = floor((ceil($roun) / $revolutionsperyear));
03:43:53 <cej> $avg_num_month = $ttl_num_months/$i;
03:43:53 <cej> $jtl = abs(abs($roun) - ceil($revolutionsperyear*($numyears+1)));
03:43:53 <cej> while($month==0){
03:43:53 <cej> $day=0;
03:43:53 <cej> $u=0;
03:43:53 <cej> foreach($monthusage as $key => $item){
03:43:53 <cej> $t=0;
03:43:53 <cej> foreach($item as $numdays){
03:43:53 <cej> $t++;
03:43:53 <cej> $tt=0;
03:43:53 <cej> for($sh=1;$sh<=$numdays;$sh++){
03:43:53 <cej> $ii=$ii+1;
03:43:53 <cej> $tt++;
03:43:53 <cej> if ($ii==floor($jtl)){
03:43:53 <cej> if ($roun<0){
03:43:53 <cej> $daynum = $tt;
03:43:53 <cej> $month = $t;
03:43:53 <cej> } else {
03:43:53 <cej> $daynum = $numdays-($tt-1);
03:43:53 <cej> $month = $avg_num_month-($t-1);
03:43:53 <cej> }
03:43:53 <cej> $sequence = $key;
03:43:53 <cej> $nodaycount=true;
03:43:53 <cej> }
03:43:53 <cej> }
03:43:53 <cej> if ($nodaycount==false)
03:43:53 <cej> $day++;
03:43:53 <cej> }
03:43:53 <cej> $u++;
03:43:53 <cej> }
03:43:53 <cej> }
03:43:53 <cej> //$numyears = abs($numyears);
03:43:53 <cej>
03:43:53 <cej> $timer = substr($roun, strpos($roun,'.')+1,strlen($roun)-strpos($roun,'.')-1);
03:43:53 <cej> $roun_out= $numyears.'/'.$month.'/'.$daynum.' '.$day.'.'. floor(intval(substr($timer,0,2))/100*$timeset['hours']).':'. floor(intval(substr($timer,2,2))/100*$timeset['minutes']).':'. floor(intval(substr($timer,4,2))/100*$timeset['seconds']).'.'.substr($timer,6,strlen($timer)-6);
03:43:53 <cej> $roun_obj = array('stardate'=>"$numyears.$day", 'year'=>$numyears,'month'=>$month, 'mname' => $monthnames[$sequence][$month-1],'day'=>$daynum, 'jtl'=>$jtl, 'day_count'=>$day,'hours'=>floor(intval(substr($timer,0,2))/100*$timeset['hours']),'minute'=> floor(intval(substr($timer,2,2))/100*$timeset['minutes']),'seconds'=> floor(intval(substr($timer,4,2))/100*$timeset['seconds']),'microtime'=>sub
03:43:53 <cej> str($timer,6,strlen($timer)-6),'strout'=>$roun_out);
03:43:53 <cej> return $roun_obj;
08:08:03 Quit: Loserbait ([email protected]) Quit: Leaving
11:14:31 Quit: schnoodles ([email protected]) *.net *.split
11:15:13 Join: schnoodles ([email protected]) to #php
12:43:51 Quit: schnoodles ([email protected]) Ping timeout: 121 seconds
12:48:03 Join: schnoodles ([email protected]) to #php
13:16:29 Quit: schnoodles ([email protected]) *.net *.split
13:26:21 Join: schnoodles ([email protected]) to #php
18:56:07 Join: Loserbait ([email protected]) to #php