<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ~~~ /** * 生日轉年齡 * @param $birthday 1990-01-01 * @return false|mixed|string */ function birthday2age($birthday) { list($year, $month, $day) = explode("-", $birthday); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0 || $month_diff < 0) { $year_diff--; } return $year_diff; } ~~~ ~~~ /** * $date是時間戳 * $type為1的時候是虛歲,2的時候是周歲 */ function getAgeByBirth($date, $type = 1) { $nowYear = date("Y", time()); $nowMonth = date("m", time()); $nowDay = date("d", time()); $birthYear = date("Y", $date); $birthMonth = date("m", $date); $birthDay = date("d", $date); if ($type == 1) { $age = $nowYear - ($birthYear - 1); } else { $type == 2} { if ($nowMonth < $birthMonth) { $age = $nowYear - $birthYear - 1; } elseif ($nowMonth == $birthMonth) { if ($nowDay < $birthDay) { $age = $nowYear - $birthYear - 1; } else { $age = $nowYear - $birthYear; } } else { $age = $nowYear - $birthYear; } } return $age; } ~~~ ~~~ /** * 根據身份證號獲取年齡 * @param $id * @return false|float|int|mixed|string */ function getAgeByID($id) { //過了這年的生日才算多了1周歲 if (empty($id)) { return ''; } $date = strtotime(substr($id, 6, 8)); //獲得出生年月日的時間戳 $today = strtotime('today'); //獲得今日的時間戳 $diff = floor(($today - $date) / 86400 / 365); //得到兩個日期相差的大體年數 //strtotime加上這個年數后得到那日的時間戳后與今日的時間戳相比 $age = strtotime(substr($id, 6, 8).' +'.$diff.'years') > $today ? ($diff + 1) : $diff; return $age; } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看