/[LeafOK_CVS]/fenglin/lib/astro.inc.php
ViewVC logotype

Diff of /fenglin/lib/astro.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Tue Dec 7 01:59:24 2004 UTC Revision 1.6 by sysadm, Tue Apr 29 11:55:32 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2    function Date2Astro(int $month, int $day) : string
 function Date2Astro($month,$day)  
3  {  {
4            $dates = array(21, 20, 21, 21, 22, 22, 23, 24, 24, 24, 23, 22);
5            $astro = array("摩羯", "水瓶", "双鱼", "白羊", "金牛", "双子", "巨蟹", "狮子", "处女", "天秤", "天蝎", "射手", "摩羯");
6    
7          if ($month < 1 || $month >12 || $day < 1 || $day > 31)          if ($month < 1 || $month >12 || $day < 1 || $day > 31)
8            {
9                  return $astro[0];                  return $astro[0];
10          $dates = array(21, 20, 21, 21, 22, 22, 23, 24, 24, 24, 23, 22);          }
11          $astro = array("Ħ", "ˮƿ", "˫", "", "ţ", "˫", "з", "ʨ", "Ů", "", "Ы", "", "Ħ");  
12          if ($day < $dates[$month-1])          if ($day < $dates[$month - 1])
13                  return $astro[$month-1];          {
14          else                  return $astro[$month - 1];
15                  return $astro[$month];          }
 }  
16    
17  ?>          return $astro[$month];
18    }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1