{"id":72771,"date":"2025-02-03T07:33:29","date_gmt":"2025-02-02T23:33:29","guid":{"rendered":"https:\/\/0592ban.cn\/?p=72771"},"modified":"2025-02-03T07:33:29","modified_gmt":"2025-02-02T23:33:29","slug":"%e5%b9%b4-3-%e6%ad%a4%e5%a4%84%e6%8f%92%e5%85%a5%e5%85%b7%e4%bd%93%e5%a4%a9%e6%95%b0-%e4%bb%8e-%e5%a4%a9-%e6%9c%88-21%e6%97%a5%e8%87%b3%e4%bb%8a%e5%b7%b2%e8%bf%87%e5%8e%bb-2021","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2025\/02\/03\/%e5%b9%b4-3-%e6%ad%a4%e5%a4%84%e6%8f%92%e5%85%a5%e5%85%b7%e4%bd%93%e5%a4%a9%e6%95%b0-%e4%bb%8e-%e5%a4%a9-%e6%9c%88-21%e6%97%a5%e8%87%b3%e4%bb%8a%e5%b7%b2%e8%bf%87%e5%8e%bb-2021\/","title":{"rendered":"\u5e74 3 [\u6b64\u5904\u63d2\u5165\u5177\u4f53\u5929\u6570] \u4ece \u5929 \u6708 21\u65e5\u81f3\u4eca\u5df2\u8fc7\u53bb 2021"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u5929\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2025\/02\/7af00a8e-1538-437d-b812-ef43e9dc1458.jpg\"\/><\/p>\n<p>\n \u672c\u5de5\u5177\u53ef\u4ee5\u8ba1\u7b97\u4e24\u4e2a\u65e5\u671f\u4e4b\u95f4\u7684\u5929\u6570\u3001\u51c6\u786e\u5e74\u9f84\u548c\u5e74\u9f84\u5206\u671f\u3002\n<\/p>\n<form action=\"time-calculator.php\" method=\"post\">\n <label for=\"start-date\"><br \/>\n  \u8d77\u59cb\u65e5\u671f\uff1a<br \/>\n <\/label><br \/>\n <input id=\"start-date\" name=\"start-date\" type=\"date\"\/><br \/>\n <label for=\"end-date\"><br \/>\n  \u7ed3\u675f\u65e5\u671f\uff1a<br \/>\n <\/label><br \/>\n <input id=\"end-date\" name=\"end-date\" type=\"date\"\/><br \/>\n <input type=\"submit\" value=\"\u8ba1\u7b97\"\/><br \/>\n<\/form>\n<p><!--?php\n  if (isset($_POST['start-date']) && isset($_POST['end-date'])) {\n    $start_date =$_POST['start-date'];\n    $end_date = $_POST['end-date'];\n\n    \/\/ \u8ba1\u7b97\u4e24\u4e2a\u65e5\u671f\u4e4b\u95f4\u7684\u5929\u6570\n    $start_date_timestamp = strtotime($start_date);\n    $end_date_timestamp = strtotime($end_date);\n    $days = ($end_date_timestamp - $start_date_timestamp) \/ (60  60  24);\n\n    \/\/ \u8ba1\u7b97\u51c6\u786e\u5e74\u9f84\n    $dob = strtotime($start_date);\n    $today = time();\n    $age = floor(($today - $dob) \/ (60  60  24  365));\n\n    \/\/ \u8ba1\u7b97\u5e74\u9f84\u5206\u671f\n    if ($age <= 44) {\n      $age_group = '\u9752\u5e74\u4eba';\n    } elseif ($age <= 59) {\n      $age_group = '\u4e2d\u5e74\u4eba\uff08\u58ee\u5e74\u671f\uff09';\n    } elseif ($age <= 74) {\n      $age_group = '\u5e74\u8f7b\u8001\u4eba';\n    } elseif ($age <= 89) {\n      $age_group = '\u771f\u6b63\u8001\u4eba';\n    } elseif ($age <=100) {\n      $age_group = '\u957f\u5bff\u8001\u4eba';\n    } else {\n      $age_group = '\u767e\u5c81\u8001\u4eba';\n    }\n\n    echo '<p-->\n\u4ece &#8216; . $start_date . &#8216; \u5230 &#8216; . $end_date . &#8216; \u4e4b\u95f4\u7684\u5929\u6570\uff1a&#8217; . $days . &#8216;<br \/>\n&#8216;;<br \/>\n    echo &#8216;<\/p>\n<p>\n \u51c6\u786e\u5e74\u9f84\uff1a&#8217; . $age . &#8216;\n<\/p>\n<p>&#8216;;<br \/>\n    echo &#8216;<\/p>\n<p>\n \u5e74\u9f84\u5206\u671f\uff1a&#8217; . $age_group . &#8216;\n<\/p>\n<p>&#8216;;<br \/>\n  }<br \/>\n  ?&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u5de5\u5177\u53ef\u4ee5\u8ba1\u7b97\u4e24\u4e2a\u65e5\u671f\u4e4b\u95f4\u7684\u5929\u6570\u3001\u51c6\u786e\u5e74\u9f84\u548c\u5e74\u9f84\u5206\u671f\uff0c\u8d77\u59cb\u65e5\u671f\uff0c\u7ed3\u675f\u65e5\u671f\uff0c\u4ece.$start\uff0cdate.\u5230.$end\uff0cdate.\u4e4b\u95f4\u7684\u5929\u6570\uff0c.$days.\uff0cecho\u51c6\u786e\u5e74\u9f84\uff0c.$age.\uff0cecho\u5e74\u9f84\u5206\u671f\uff0c.$age\uff0cgroup.\uff0c?&#038;gt\uff0c&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":72770,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[32047,4119,32046,496,23252,2508,232,454],"class_list":["post-72771","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-32047","tag-4119","tag-32046","tag-496","tag-23252","tag-2508","tag-232","tag-454"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/72771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/comments?post=72771"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/72771\/revisions"}],"predecessor-version":[{"id":72772,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/72771\/revisions\/72772"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/72770"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=72771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=72771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=72771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}