生肖查询计算器 年龄查生肖计算器

纳尼

生肖查询计算器生肖查询大全下载,以上就是怎么用年龄计。抖音超火年龄计算器在线测试入口抖音上搜索年龄计算器小程序即可找到这个测试入口。就可以看到对方的生日、生肖、星座等等相关信息了还是比较全面的。

php 自动计算12生肖

属相计算器生肖查询软件
<?php
//2002/10/23-->出生年
/*
计算12个星座
计算12个生肖
计算年龄
*/
class timeage
{
public $y = 0;
public $m = 0;
public $d = 0;
public $age = 0;
public $time = 0;
public function __construct($time)
{
$this->time = $time;
$this->y = date('Y',$this->time);
$this->m = date('m',$this->time);
$this->d = date('d',$this->time);
}
public function getage()
{
$this->age = time() - $this->time;
$this->age = $this->age/60/60/24/365;
return (int)$this->age;
}
public function getconstellation()
{
switch ($this->m)
{
case 1:
if ($this->d < 19)
{
$this->constellation = '摩羯座';
return $this->constellation;
}
else
{
$this->constellation = '水瓶座';
return $this->constellation;
}
break;
case 2:
if ($this->d < 18)
{
$this->constellation = '水瓶座';
return $this->constellation;
}
else
{
$this->constellation = '双鱼座';
return $this->constellation;
}
break;
case 3:
if ($this->d < 20)
{
$this->constellation = '双鱼座';
return $this->constellation;
}
else
{
$this->constellation = '白羊座';
return $this->constellation;
}
break;
case 4:
if ($this->d < 19)
{
$this->constellation = '白羊座';
return $this->constellation;
}
else
{
$this->constellation = '金牛座';
return $this->constellation;
}
break;
case 5:
if ($this->d < 20)
{
$this->constellation = '金牛座';
return $this->constellation;
}
else
{
$this->constellation = '双子座';
return $this->constellation;
}
break;
case 6:
if ($this->d < 21)
{
$this->constellation = '双子座';
return $this->constellation;
}
else
{
$this->constellation = '巨蟹座';
return $this->constellation;
}
break;
case 7:
if ($this->d < 22)
{
$this->constellation = '巨蟹座';
return $this->constellation;
}
else
{
$this->constellation = '狮子座';
return $this->constellation;
}
break;
case 8:
if ($this->d < 22)
{
$this->constellation = '狮子座';
return $this->constellation;
}
else
{
$this->constellation = '处女座';
return $this->constellation;
}
break;
case 9:
if ($this->d < 22)
{
$this->constellation = '处女座';
return $this->constellation;
}
else
{
$this->constellation = '天秤座';
return $this->constellation;
}
break;
case 10:
if ($this->d < 23)
{
$this->constellation = '天秤座';
return $this->constellation;
}
else
{
$this->constellation = '天蝎座';
return $this->constellation;
}
break;
case 11:
if ($this->d < 22)
{
$this->constellation = '天蝎座';
return $this->constellation;
}
else
{
$this->constellation = '射手座';
return $this->constellation;
}
break;
case 12:
if ($this->d < 20)
{
$this->constellation = '射手座';
return $this->constellation;
}
else
{
$this->constellation = '摩羯座';
return $this->constellation;
}
break;
}
}
public function getzodiac()
{
$this->animals = array('鼠', '牛', '虎', '兔', '龙', '蛇','马', '羊', '猴', '鸡', '狗', '猪');
$this->zodiac = ($this->y - 1900) % 12;
return $this->animals[$this->zodiac];
}
}
$age = strtotime('1993-07-25');
echo $age;
$a = new timeage($age);
echo '<br>';
echo $a->y;
echo '<br>';
echo $a->m;
echo '<br>';
echo $a->d;
echo '<br>';
echo $a->time;
echo '<br>';
echo $a->age;
echo '<br>';
echo $a->getage();
echo '<br>';
echo $a->getconstellation();
echo '<br>';
echo $a->getzodiac();
//没事干替你写了个全部的功能函数 写代码类 记得给好评

生肖星座计算器怎么样

小牛计算器
如题,就是一款查询生肖和星座的应用。ui还是不错的,功能过于简单了,图标设计的也一般吧。限时免费收下了。希望增加功能,比如生效和星座相关的内容。如果朋友喜欢就收下吧,1m大小而已,新版本应该会增加新功能吧。