28)) {$_GET['dcode_day'] = 1;$_GET['dcode_mo'] = 3;} if (($_GET['dcode_mo'] == 4) && ($_GET['dcode_day'] > 30)) {$_GET['dcode_day'] = 1;$_GET['dcode_mo'] = 5;} if (($_GET['dcode_mo'] == 6) && ($_GET['dcode_day'] > 30)) {$_GET['dcode_day'] = 1;$_GET['dcode_mo'] = 7;} if (($_GET['dcode_mo'] == 9) && ($_GET['dcode_day'] > 30)) {$_GET['dcode_day'] = 1;$_GET['dcode_mo'] = 10;} if (($_GET['dcode_mo'] == 11) && ($_GET['dcode_day'] > 30)) {$_GET['dcode_day'] = 1;$_GET['dcode_mo'] = 12;} $dcode_yr = $_GET['dcode_yr']; $dcode_mo = $_GET['dcode_mo']; $dcode_day = $_GET['dcode_day']; $dcode_bcad = "AD"; // Format for MySQL $mysql_date = $dcode_yr."-".$dcode_mo."-".$dcode_day; $this_mysql_date = $mysql_date; } // Assign to AD if no entry for dcode_bcad if (($dcode_bcad !== "BC")||($dcode_bcad !== "AD")){ $dcode_bcad = "AD"; } // Get the kin number for the day ================================== THE KIN - THE KIN - THE KIN =================================================== $this_day_kin_num = tmc_date_mysql_to_kin($this_mysql_date, "AD"); // Get the kin number for the day ================================== THE KIN - THE KIN - THE KIN =================================================== // Change Locale, as needed // What language are you using? $ucd_locale = get_locale(); // What language are you using? // $ucd_locale = get_locale(); if ($ucd_locale == "es_ES"){$file_fun_lang_ext = "_es";} elseif ($ucd_locale == "nl_NL"){$file_fun_lang_ext = "_nl";} else {$file_fun_lang_ext = "_en";} // We can make a pretty date in different languages, but it's not simple // Break up date for functions $this_date_pcs = explode("-", $this_mysql_date); // Use adodb for a special timestamp // adodb_mktime($hr, $min, $sec[, $month, $day, $year]) $this_date_adodb_timestamp = adodb_mktime(0, 0, 0, $this_date_pcs[1], $this_date_pcs[2], $this_date_pcs[0]); $this_nice_date = adodb_date("D M j, Y", $this_date_adodb_timestamp); // Let's get the date $this_day_year = $this_date_pcs[0]; $this_day_mon = $this_date_pcs[1]; $this_day_day = $this_date_pcs[2]; // Display Nice Date // Uses locale() above // strtotime() has a range limit between Fri, 13 Dec 1901 20:45:54 GMT and Tue, 19 Jan 2038 03:14:07 GMT if (($this_day_year >= 1902)&&($this_day_year <= 2037)){ $this_nice_translated_date = utf8_encode(strftime("%A %e %B %Y", strtotime("$this_day_mon/$this_day_day/$this_day_year"))); } else {$this_nice_translated_date = $this_nice_date;} // Prepare nice Gregorian date $nice_date = $this_nice_translated_date; // To avoid database query, we simply load the output of the kin table into an array // Choose the correct file $lines = file(dirname(__FILE__).'/kin_lookup'.$file_fun_lang_ext.'.txt'); // read into array $lines[] $inc = 0; foreach ($lines as $kin_line){ $kin_line_array[$inc] = explode("|", $kin_line); $inc ++; } // Get the converted 13-Moon NS Date $somvealue = include(dirname(__FILE__).'/get_ns_date.inc'); // Get the translated tone $this_moon_name = $kin_line_array[$this_moon_num][6]; $this_moon_name = utf8_encode($this_moon_name); ?>