{"id":57481,"date":"2025-01-03T08:04:34","date_gmt":"2025-01-03T00:04:34","guid":{"rendered":"https:\/\/0592ban.cn\/?p=57481"},"modified":"2025-01-03T08:04:34","modified_gmt":"2025-01-03T00:04:34","slug":"1978%e5%b9%b4%e5%86%9c%e5%8e%8612%e6%9c%8818%e6%97%a5%e5%af%b9%e5%ba%94%e7%9a%84%e9%98%b3%e5%8e%86%e6%97%a5%e6%9c%9f-1978%e5%b9%b4%e5%86%9c%e5%8e%86","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2025\/01\/03\/1978%e5%b9%b4%e5%86%9c%e5%8e%8612%e6%9c%8818%e6%97%a5%e5%af%b9%e5%ba%94%e7%9a%84%e9%98%b3%e5%8e%86%e6%97%a5%e6%9c%9f-1978%e5%b9%b4%e5%86%9c%e5%8e%86\/","title":{"rendered":"1978\u5e74\u519c\u538612\u670818\u65e5\u5bf9\u5e94\u7684\u9633\u5386\u65e5\u671f (1978\u5e74\u519c\u5386)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"1978\u5e74\u519c\u538612\u670818\u65e5\u5bf9\u5e94\u7684\u9633\u5386\u65e5\u671f\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2025\/01\/c7d1db1f-d924-424c-8e01-41f7bea0d090.jpg\"\/><\/p>\n<h2>\n \u519c\u5386\u7b80\u4ecb<br \/>\n<\/h2>\n<p>\n \u519c\u5386\uff0c\u53c8\u79f0\u9634\u5386\u3001\u534e\u5386\u3001\u590f\u5386\u3001\u4e2d\u5386\u7b49\uff0c\u662f\u4e00\u79cd\u9634\u9633\u5386\uff0c\u878d\u5408\u4e86\u9634\u5386\u548c\u9633\u5386\u7684\u6210\u5206\u3002\u519c\u5386\u4ee5\u6708\u76f8\u53d8\u5316\u5468\u671f\uff08\u6714\u671b\u6708\uff09\u4e3a\u6708\u7684\u957f\u5ea6\uff0c\u52a0\u5165\u5e72\u652f\u5386\u7684\u4e8c\u5341\u56db\u8282\u6c14\u6210\u5206\uff0c\u53c2\u8003\u592a\u9633\u56de\u5f52\u5e74\u4e3a\u5e74\u7684\u957f\u5ea6\uff0c\u901a\u8fc7\u8bbe\u7f6e\u95f0\u6708\u4ee5\u4f7f\u5e73\u5747\u5386\u5e74\u4e0e\u56de\u5f52\u5e74\u76f8\u9002\u5e94\u3002\n<\/p>\n<h3>\n \u519c\u5386\u4e0e\u9633\u5386\u7684\u533a\u522b<br \/>\n<\/h3>\n<ul>\n<li>\n  \u6708\u76f8\u53d8\u5316\uff1a\u519c\u5386\u4ee5\u6708\u76f8\u53d8\u5316\u4e3a\u57fa\u51c6\uff0c\u6bcf\u4e2a\u6708\u90fd\u6709\u4e00\u4e2a\u65b0\u6708\uff08\u6714\uff09\u548c\u4e00\u4e2a\u6ee1\u6708\uff08\u671b\uff09\u3002\u800c\u9633\u5386\u4e0d\u8003\u8651\u6708&gt;\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5de5\u5177\u67e5\u8be2\u519c\u5386\u548c\u9633\u5386\u4e4b\u95f4\u7684\u8f6c\u6362\uff1a<\/p>\n<form>\n   <label for=\"lunar_date\"><br \/>\n    \u519c\u5386\u65e5\u671f\uff1a<br \/>\n   <\/label><br \/>\n   <input id=\"lunar_date\" name=\"lunar_date\" type=\"date\"\/><br \/>\n   <input type=\"submit\" value=\"\u67e5\u8be2\"\/><br \/>\n  <\/form>\n<h3>\n   \u7ed3\u679c<br \/>\n  <\/h3>\n<h2>\n   \u67e5\u8be2\u661f\u5ea7<br \/>\n  <\/h2>\n<p>\n   \u661f\u5ea7\u662f\u6309\u9633\u5386\u751f\u65e5\u7b97\u7684\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5de5\u5177\u67e5\u8be2\u9633\u5386\u65e5\u671f\u5bf9\u5e94\u7684\u661f\u5ea7\uff1a\n  <\/p>\n<form>\n   <label for=\"solar_date\"><br \/>\n    \u9633\u5386\u65e5\u671f\uff1a<br \/>\n   <\/label><br \/>\n   <input id=\"solar_date\" name=\"solar_date\" type=\"date\"\/><br \/>\n   <input type=\"submit\" value=\"\u67e5\u8be2\"\/><br \/>\n  <\/form>\n<h3>\n   \u7ed3\u679c<br \/>\n  <\/h3>\n<p>  <script>\n   const lunarToSolar = (lunarDate) => {\n      const date = new Date(lunarDate);\n      const year = date.getFullYear();\n      const month = date.getMonth();\n      const day = date.getDate();\n      let solarDate = new Date(year - 1900, month, day);\n      if (solarDate.getMonth() > 0) {\n        solarDate.setMonth(solarDate.getMonth() -\u53cc\u5b50\u5ea7\";\n          break;\n        case 5:\n          constellation = day <= 20 ? \"\u53cc\u5b50\u5ea7\" : \"\u5de8\u87f9\u5ea7\";\n          break;\n        case 6:\n          constellation = day <= 22 ? \"\u5de8\u87f9\u5ea7\" : \"\u72ee\u5b50\u5ea7\";\n          break;\n        case 7:\n          constellation = day <= 22 ? \"\u72ee\u5b50\u5ea7\" : \"\u5904\u5973\u5ea7\";\n          break;\n        case 8:\n          constellation = day <= 22 ? \"\u5904\u5973\u5ea7\" : \"\u5929\u79e4\u5ea7\";\n          break;\n        case 9:\n          constellation = day <= 22 ? \"\u5929\u79e4\u5ea7\" : \"\u5929\u874e\u5ea7\";\n          break;\n        case 10:\n          constellation = day <= 21 ? \"\u5929\u874e\u5ea7\" : \"\u5c04\u624b\u5ea7\";\n          break;\n        case 11:\n          constellation = day <= 21 ? \"\u5c04\u624b\u5ea7\" : \"\u6469\u7faf\u5ea7\";\n          break;\n      }\n      return constellation;\n    };\n\n    const handleLunarDateSubmit = (e) => {\n      e.preventDefault();\n      const lunarDate = e.target.querySelector('input[name=\"lunar_date\"]').value;\n      const solarDate = lunarToSolar(lunarDate);\n      const result = `${solarDate.getFullYear()}-${solarDate.getMonth() + 1}-${solarDate.getDate()}`;\n      document.querySelector('result').innerText = result;\n    };<\/p>\n<p>    const handleSolarDateSubmit = (e) => {\n      e.preventDefault();\n      const solarDate = e.target.querySelector('input[name=\"solar_date\"]').value;\n      const constellation = solarToConstellation(new Date(solarDate));\n      document.querySelector('constellation_result').innerText = constellation;\n    };<\/p>\n<p>    const form = document.querySelector('form');\n    form.addEventListener('submit', handleLunarDateSubmit);\n    form.addEventListener('submit', handleSolarDateSubmit);\n  <\/script>\n <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u519c\u5386\u7b80\u4ecb\u519c\u5386\uff0c\u53c8\u79f0\u9634\u5386\u3001\u534e\u5386\u3001\u590f\u5386\u3001\u4e2d\u5386\u7b49\uff0c\u662f\u4e00\u79cd\u9634\u9633\u5386\uff0c\u878d\u5408\u4e86\u9634\u5386\u548c\u9633\u5386\u7684\u6210\u5206\uff0c\u519c\u5386\u4ee5\u6708\u76f8\u53d8\u5316\u5468\u671f\uff0c\u6714\u671b\u6708\uff0c\u4e3a\u6708\u7684\u957f\u5ea6\uff0c\u52a0\u5165\u5e72\u652f\u5386\u7684\u4e8c\u5341\u56db\u8282\u6c14\u6210\u5206\uff0c\u53c2\u8003\u592a\u9633\u56de\u5f52\u5e74\u4e3a\u5e74\u7684\u957f\u5ea6\uff0c\u901a\u8fc7\u8bbe\u7f6e\u95f0\u6708\u4ee5\u4f7f\u5e73\u5747\u5386\u5e74\u4e0e\u56de\u5f52\u5e74\u76f8\u9002\u5e94\uff0c\u519c\u5386\u4e0e\u9633\u5386\u7684\u533a\u522b\u6708\u76f8\u53d8\u5316\uff0c\u519c\u5386\u4ee5\u6708\u76f8\u53d8\u5316\u4e3a\u57fa\u51c6\uff0c\u6bcf\u4e2a\u6708\u90fd\u6709\u4e00\u4e2a\u65b0\u6708\uff0c\u6714\uff0c\u548c\u4e00\u4e2a\u6ee1\u6708\uff0c\u671b\uff0c\u800c\u9633\u5386\u4e0d\u8003\u8651\u6708&#038;gt\uff0c\u60a8\u53ef\u4ee5\u4f7f&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":57480,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[24783],"class_list":["post-57481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-24783"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/57481","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=57481"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/57481\/revisions"}],"predecessor-version":[{"id":57482,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/57481\/revisions\/57482"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/57480"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=57481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=57481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=57481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}