{"id":64761,"date":"2025-01-18T04:44:30","date_gmt":"2025-01-17T20:44:30","guid":{"rendered":"https:\/\/0592ban.cn\/?p=64761"},"modified":"2025-01-18T04:44:30","modified_gmt":"2025-01-17T20:44:30","slug":"%e5%86%9c%e5%8e%861978%e5%b9%b412%e6%9c%8817%e6%97%a5%e5%af%b9%e5%ba%94%e7%9a%84%e9%98%b3%e5%8e%86%e6%97%a5%e6%9c%9f-%e5%86%9c%e5%8e%861978%e5%b9%b4%e6%97%a5%e5%8e%86%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2025\/01\/18\/%e5%86%9c%e5%8e%861978%e5%b9%b412%e6%9c%8817%e6%97%a5%e5%af%b9%e5%ba%94%e7%9a%84%e9%98%b3%e5%8e%86%e6%97%a5%e6%9c%9f-%e5%86%9c%e5%8e%861978%e5%b9%b4%e6%97%a5%e5%8e%86%e8%a1%a8\/","title":{"rendered":"\u519c\u53861978\u5e7412\u670817\u65e5\u5bf9\u5e94\u7684\u9633\u5386\u65e5\u671f (\u519c\u53861978\u5e74\u65e5\u5386\u8868)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u519c\u53861978\u5e7412\u670817\u65e5\u5bf9\u5e94\u7684\u9633\u5386\u65e5\u671f\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2025\/01\/bdea4fb6-686c-48d0-838b-9ecb668ee3d7.jpg\"\/><\/p>\n<p>\n \u519c\u5386\u620a\u5348(1978)\u5e74\u814a\u6708\u5341\u4e03\uff0c\u751f\u8096\u5c5e\u9a6c\uff0c\u8ddd\u79bb\u4eca\u65e5\u5df2\u7ecf\u8fc7\u53bb<br \/>\n \u5929\u3002\n<\/p>\n<p>\n \u9633\u53861979\u5e741\u670815\u65e5\u661f\u671f\u4e00\u6469\u7faf\u5ea7\u3002\n<\/p>\n<h2>\n \u67e5\u8be2\u65e5\u671f<br \/>\n<\/h2>\n<p>\n <label for=\"lunar-date\"><br \/>\n  \u519c\u5386\u65e5\u671f\uff1a<br \/>\n <\/label><br \/>\n <input id=\"lunar-date\" placeholder=\"\u5982\uff1a1978\u5e74\u814a\u6708\u5341\u4e03\" type=\"text\"\/>\n<\/p>\n<p><button id=\"query-button\"><br \/>\n \u67e5\u8be2<br \/>\n<\/button><br \/>\n<\/p>\n<h2>\n \u67e5\u8be2\u7ed3\u679c<br \/>\n<\/h2>\n<div id=\"result\">\n<table border=\"1\">\n<thead>\n<tr>\n<th>\n     \u519c\u5386\n    <\/th>\n<th>\n     \u9633&#8217;);<br \/>\n    const stemBranchResult = document.getElementById(&#8216;stem-branch-result&#8217;);<br \/>\n    const days = Math.floor((new Date() &#8211; new Date(1979, 10, 17, 0, 0, 0)) \/ 1000 \/ 60 \/ 60 \/ 24);<br \/>\n    document.getElementById(&#8216;days&#8217;).innerHTML = days;<\/p>\n<p>    queryButton.addEventListener(&#8216;click&#8217;, () =&gt; {<br \/>\n      const lunarDate = lunarDateInput.value;<br \/>\n      const lunarDateArray = lunarDate.split(&#8216;\u5e74&#8217;);<br \/>\n      const year = parseInt(lunarDateArray[0], 10);<br \/>\n      const month = parseInt(lunarDateArray[1].slice(0, 2), 10);<br \/>\n      const day = parseInt(lunarDateArray[1].slice(2), 10);<\/p>\n<p>      const solarDate = new Date(year, month &#8211; 1, day, 0, 0, 0);<br \/>\n      const dayOfWeek = [&#8216;\u661f\u671f\u65e5&#8217;, &#8216;\u661f\u671f\u4e00&#8217;, &#8216;\u661f\u671f\u4e8c&#8217;, &#8216;\u661f\u671f\u4e09&#8217;, &#8216;\u661f\u671f\u56db&#8217;, &#8216;\u661f\u671f\u4e94&#8217;, &#8216;\u661f\u671f\u516d&#8217;][solarDate.getDay()];<br \/>\n      const zodiac = [&#8216;\u7334&#8217;, &#8216;\u9e21&#8217;, &#8216;\u72d7&#8217;, &#8216;\u732a&#8217;, &#8216;\u9f20&#8217;, &#8216;\u725b&#8217;, &#8216;\u864e&#8217;, &#8216;\u5154&#8217;, &#8216;\u9f99&#8217;, &#8216;\u86c7&#8217;, &#8216;\u9a6c&#8217;, &#8216;\u7f8a&#8217;][year % 12];<br \/>\n      const constellation = [&#8216;\u6469\u7faf\u5ea7&#8217;, &#8216;\u6c34\u74f6\u5ea7&#8217;, &#8216;\u53cc\u9c7c\u5ea7&#8217;, &#8216;\u767d\u7f8a\u5ea7&#8217;, &#8216;\u91d1\u725b\u5ea7&#8217;, &#8216;\u53cc\u5b50\u5ea7&#8217;, &#8216;\u5de8\u87f9\u5ea7&#8217;, &#8216;\u72ee\u5b50\u5ea7&#8217;, &#8216;\u5904\u5973\u5ea7&#8217;, &#8216;\u5929\u79e4\u5ea7&#8217;, &#8216;\u5929\u874e\u5ea7&#8217;, &#8216;\u5c04\u624b\u5ea7&#8217;][Math.floor(month &#8211; 1) % 12];<br \/>\n      const stemBranch = [&#8216;\u7532\u5b50&#8217;, &#8216;\u4e59\u4e11&#8217;, &#8216;\u4e19\u5bc5&#8217;, &#8216;\u4e01\u536f&#8217;, &#8216;\u620a\u8fb0&#8217;, &#8216;\u5df1\u5df3&#8217;, &#8216;\u5e9a\u5348&#8217;, &#8216;\u8f9b\u672a&#8217;, &#8216;\u58ec\u7533&#8217;, &#8216;\u7678\u9149&#8217;, &#8216;\u7532\u620c&#8217;, &#8216;\u4e59\u4ea5&#8217;, &#8216;\u4e19\u5b50&#8217;, &#8216;\u4e01\u4e11&#8217;, &#8216;\u620a\u5bc5&#8217;, &#8216;\u5df1\u536f&#8217;, &#8216;\u5e9a\u8fb0&#8217;,&#8217;\u8f9b\u5df3&#8217;, &#8216;\u58ec\u5348&#8217;, &#8216;\u7678\u672a&#8217;, &#8216;\u7532\u7533&#8217;, &#8216;\u4e59\u9149&#8217;, &#8216;\u4e19\u620c&#8217;, &#8216;\u4e01\u4ea5&#8217;, &#8216;\u620a\u5b50&#8217;, &#8216;\u5df1\u4e11&#8217;, &#8216;\u5e9a\u5bc5&#8217;, &#8216;\u8f9b\u536f&#8217;, &#8216;\u58ec\u8fb0&#8217;, &#8216;\u7678\u5df3&#8217;, &#8216;\u7532\u5348&#8217;, &#8216;\u4e59\u672a&#8217;, &#8216;\u4e19\u7533&#8217;, &#8216;\u4e01\u9149&#8217;, &#8216;\u620a\u620c&#8217;, &#8216;\u5df1\u4ea5&#8217;][year % 60 &#8211; 1];<\/p>\n<p>      lunarDateResult.innerHTML = lunarDate;<br \/>\n      solarDateResult.innerHTML = `${solarDate.getFullYear()}\u5e74${solarDate.getMonth() + 1}\u6708${solarDate.getDate()}\u65e5`;<br \/>\n      dayOfWeekResult.innerHTML = dayOfWeek;<br \/>\n      zodiacResult.innerHTML = zodiac;<br \/>\n      constellationResult.innerHTML = constellation;<br \/>\n      stemBranchResult.innerHTML = stemBranch;<br \/>\n    });\n    <\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u519c\u5386\u620a\u5348\uff0c1978\uff0c\u5e74\u814a\u6708\u5341\u4e03\uff0c\u751f\u8096\u5c5e\u9a6c\uff0c\u8ddd\u79bb\u4eca\u65e5\u5df2\u7ecf\u8fc7\u53bb\u5929\uff0c\u9633\u53861979\u5e741\u670815\u65e5\u661f\u671f\u4e00\u6469\u7faf\u5ea7\uff0c\u67e5\u8be2\u65e5\u671f\u519c\u5386\u65e5\u671f\uff0c\u67e5\u8be2\u67e5\u8be2\u7ed3\u679c\u519c\u5386\u9633\uff0cconststemBranchResult=document.getElementById\uff0cstem\uff0cbranch\uff0cresult\uff0cconstdays=Math.floor\uff0cnewDate\uff0c&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":64760,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[25592],"class_list":["post-64761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-25592"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/64761","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=64761"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/64761\/revisions"}],"predecessor-version":[{"id":64762,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/64761\/revisions\/64762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/64760"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=64761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=64761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=64761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}