{"id":1076283,"date":"2025-01-08T11:51:59","date_gmt":"2025-01-08T03:51:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1076283.html"},"modified":"2025-01-08T11:52:02","modified_gmt":"2025-01-08T03:52:02","slug":"python%e5%a6%82%e4%bd%95%e6%97%b6%e9%97%b4%e5%87%8f%e4%b8%80%e5%a4%a9-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1076283.html","title":{"rendered":"Python\u5982\u4f55\u65f6\u95f4\u51cf\u4e00\u5929"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24180934\/bf8763c0-e179-45b7-aa86-3ecb8fa87c36.webp\" alt=\"Python\u5982\u4f55\u65f6\u95f4\u51cf\u4e00\u5929\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u51cf\u53bb\u4e00\u5929\u7684\u65f6\u95f4\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982\u4f7f\u7528datetime\u6a21\u5757\u4e2d\u7684timedelta\u5bf9\u8c61\u3001\u4f7f\u7528pandas\u5e93\u3001dateutil\u5e93\u7b49\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u901a\u8fc7datetime\u548ctimedelta\u6765\u5b9e\u73b0\u3002<\/strong> \u5176\u4e2d\u7684\u5173\u952e\u6b65\u9aa4\u5305\u62ec\uff1a\u5bfc\u5165datetime\u6a21\u5757\u3001\u521b\u5efa\u5f53\u524d\u65e5\u671f\u5bf9\u8c61\u3001\u4f7f\u7528timedelta\u5bf9\u8c61\u51cf\u53bb\u4e00\u5929\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528datetime\u6a21\u5757\u6765\u51cf\u53bb\u4e00\u5929\u7684\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528datetime\u6a21\u5757\u51cf\u53bb\u4e00\u5929<\/h3>\n<\/p>\n<p><p>Python\u7684datetime\u6a21\u5757\u662f\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\u6570\u636e\u7684\u6807\u51c6\u5e93\u3002\u8981\u51cf\u53bb\u4e00\u5929\u7684\u65f6\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528timedelta\u5bf9\u8c61\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime, timedelta<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>current_date = datetime.now()<\/p>\n<h2><strong>\u6253\u5370\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4:&quot;, current_date)<\/p>\n<h2><strong>\u51cf\u53bb\u4e00\u5929<\/strong><\/h2>\n<p>previous_date = current_date - timedelta(days=1)<\/p>\n<h2><strong>\u6253\u5370\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4:&quot;, previous_date)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u9996\u5148\u5bfc\u5165datetime\u548ctimedelta\u6a21\u5757\u3002\u7136\u540e\uff0c\u4f7f\u7528datetime.now()\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728current_date\u53d8\u91cf\u4e2d\u3002\u63a5\u7740\uff0c\u4f7f\u7528timedelta\u5bf9\u8c61\u5e76\u8bbe\u7f6edays\u53c2\u6570\u4e3a1\uff0c\u8868\u793a\u51cf\u53bb\u4e00\u5929\u3002\u6700\u540e\uff0c\u5c06current_date\u51cf\u53bbtimedelta\u5bf9\u8c61\uff0c\u5f97\u5230\u524d\u4e00\u5929\u7684\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528pandas\u5e93\u51cf\u53bb\u4e00\u5929<\/h3>\n<\/p>\n<p><p>pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5206\u6790\u5e93\uff0c\u7279\u522b\u9002\u5408\u5904\u7406\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528pandas\u5e93\u6765\u51cf\u53bb\u4e00\u5929\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>current_date = pd.Timestamp.now()<\/p>\n<h2><strong>\u6253\u5370\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4:&quot;, current_date)<\/p>\n<h2><strong>\u51cf\u53bb\u4e00\u5929<\/strong><\/h2>\n<p>previous_date = current_date - pd.Timedelta(days=1)<\/p>\n<h2><strong>\u6253\u5370\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4:&quot;, previous_date)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u9996\u5148\u5bfc\u5165pandas\u5e93\u3002\u7136\u540e\uff0c\u4f7f\u7528pd.Timestamp.now()\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728current_date\u53d8\u91cf\u4e2d\u3002\u63a5\u7740\uff0c\u4f7f\u7528pd.Timedelta\u5bf9\u8c61\u5e76\u8bbe\u7f6edays\u53c2\u6570\u4e3a1\uff0c\u8868\u793a\u51cf\u53bb\u4e00\u5929\u3002\u6700\u540e\uff0c\u5c06current_date\u51cf\u53bbpd.Timedelta\u5bf9\u8c61\uff0c\u5f97\u5230\u524d\u4e00\u5929\u7684\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528dateutil\u5e93\u51cf\u53bb\u4e00\u5929<\/h3>\n<\/p>\n<p><p>dateutil\u5e93\u662f\u4e00\u4e2a\u6269\u5c55\u7684\u65e5\u671f\u65f6\u95f4\u5904\u7406\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u7075\u6d3b\u7684\u65e5\u671f\u65f6\u95f4\u64cd\u4f5c\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528dateutil\u5e93\u6765\u51cf\u53bb\u4e00\u5929\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>from dateutil.relativedelta import relativedelta<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>current_date = datetime.now()<\/p>\n<h2><strong>\u6253\u5370\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4:&quot;, current_date)<\/p>\n<h2><strong>\u51cf\u53bb\u4e00\u5929<\/strong><\/h2>\n<p>previous_date = current_date - relativedelta(days=1)<\/p>\n<h2><strong>\u6253\u5370\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4:&quot;, previous_date)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u9996\u5148\u5bfc\u5165datetime\u6a21\u5757\u548cdateutil.relativedelta\u6a21\u5757\u3002\u7136\u540e\uff0c\u4f7f\u7528datetime.now()\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728current_date\u53d8\u91cf\u4e2d\u3002\u63a5\u7740\uff0c\u4f7f\u7528relativedelta\u5bf9\u8c61\u5e76\u8bbe\u7f6edays\u53c2\u6570\u4e3a1\uff0c\u8868\u793a\u51cf\u53bb\u4e00\u5929\u3002\u6700\u540e\uff0c\u5c06current_date\u51cf\u53bbrelativedelta\u5bf9\u8c61\uff0c\u5f97\u5230\u524d\u4e00\u5929\u7684\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528arrow\u5e93\u51cf\u53bb\u4e00\u5929<\/h3>\n<\/p>\n<p><p>arrow\u662f\u4e00\u4e2a\u66f4\u9ad8\u7ea7\u7684\u65e5\u671f\u65f6\u95f4\u5904\u7406\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u52a0\u7b80\u6d01\u548c\u76f4\u89c2\u7684API\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528arrow\u5e93\u6765\u51cf\u53bb\u4e00\u5929\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import arrow<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>current_date = arrow.now()<\/p>\n<h2><strong>\u6253\u5370\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4:&quot;, current_date)<\/p>\n<h2><strong>\u51cf\u53bb\u4e00\u5929<\/strong><\/h2>\n<p>previous_date = current_date.shift(days=-1)<\/p>\n<h2><strong>\u6253\u5370\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4:&quot;, previous_date)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u9996\u5148\u5bfc\u5165arrow\u5e93\u3002\u7136\u540e\uff0c\u4f7f\u7528arrow.now()\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728current_date\u53d8\u91cf\u4e2d\u3002\u63a5\u7740\uff0c\u4f7f\u7528shift\u65b9\u6cd5\u5e76\u8bbe\u7f6edays\u53c2\u6570\u4e3a-1\uff0c\u8868\u793a\u51cf\u53bb\u4e00\u5929\u3002\u6700\u540e\uff0c\u5c06current_date\u51cf\u53bb\u4e00\u5929\uff0c\u5f97\u5230\u524d\u4e00\u5929\u7684\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528\u65f6\u95f4\u6233\u51cf\u53bb\u4e00\u5929<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u76f4\u63a5\u64cd\u4f5c\u65f6\u95f4\u6233\u6765\u51cf\u53bb\u4e00\u5929\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528\u65f6\u95f4\u6233\u6765\u51cf\u53bb\u4e00\u5929\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u6233<\/strong><\/h2>\n<p>current_timestamp = time.time()<\/p>\n<h2><strong>\u6253\u5370\u5f53\u524d\u65f6\u95f4\u6233<\/strong><\/h2>\n<p>print(&quot;\u5f53\u524d\u65f6\u95f4\u6233:&quot;, current_timestamp)<\/p>\n<h2><strong>\u51cf\u53bb\u4e00\u5929\u7684\u79d2\u6570\uff08\u4e00\u5929\u7b49\u4e8e86400\u79d2\uff09<\/strong><\/h2>\n<p>previous_timestamp = current_timestamp - 86400<\/p>\n<h2><strong>\u5c06\u65f6\u95f4\u6233\u8f6c\u6362\u4e3a\u65e5\u671f\u65f6\u95f4\u683c\u5f0f<\/strong><\/h2>\n<p>previous_date = time.strftime(&#39;%Y-%m-%d %H:%M:%S&#39;, time.localtime(previous_timestamp))<\/p>\n<h2><strong>\u6253\u5370\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/strong><\/h2>\n<p>print(&quot;\u51cf\u53bb\u4e00\u5929\u540e\u7684\u65e5\u671f\u548c\u65f6\u95f4:&quot;, previous_date)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u9996\u5148\u5bfc\u5165time\u6a21\u5757\u3002\u7136\u540e\uff0c\u4f7f\u7528time.time()\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u6233\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728current_timestamp\u53d8\u91cf\u4e2d\u3002\u63a5\u7740\uff0c\u51cf\u53bb\u4e00\u5929\u7684\u79d2\u6570\uff08\u4e00\u5929\u7b49\u4e8e86400\u79d2\uff09\uff0c\u5f97\u5230\u524d\u4e00\u5929\u7684\u65f6\u95f4\u6233\u3002\u6700\u540e\uff0c\u4f7f\u7528time.strftime\u548ctime.localtime\u65b9\u6cd5\u5c06\u65f6\u95f4\u6233\u8f6c\u6362\u4e3a\u65e5\u671f\u65f6\u95f4\u683c\u5f0f\uff0c\u5e76\u6253\u5370\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5728Python\u4e2d\u51cf\u53bb\u4e00\u5929\u7684\u65f6\u95f4\u3002<strong>\u65e0\u8bba\u662f\u4f7f\u7528datetime\u6a21\u5757\u3001pandas\u5e93\u3001dateutil\u5e93\u3001arrow\u5e93\u8fd8\u662f\u76f4\u63a5\u64cd\u4f5c\u65f6\u95f4\u6233\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u573a\u666f\u3002<\/strong>\u5177\u4f53\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u53d6\u51b3\u4e8e\u9879\u76ee\u7684\u9700\u6c42\u548c\u4e2a\u4eba\u7684\u7f16\u7a0b\u4e60\u60ef\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u4ee5\u8fbe\u5230\u6700\u4f73\u7684\u6548\u679c\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u5728Python\u4e2d\u5904\u7406\u65e5\u671f\u65f6\u95f4\u51cf\u53bb\u4e00\u5929\u7684\u95ee\u9898\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u51cf\u53bb\u4e00\u5929\u7684\u65e5\u671f\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>datetime<\/code>\u6a21\u5757\u6765\u5904\u7406\u65e5\u671f\u3002\u901a\u8fc7\u83b7\u53d6\u5f53\u524d\u65e5\u671f\u540e\uff0c\u5229\u7528<code>timedelta<\/code>\u5bf9\u8c61\u51cf\u53bb\u4e00\u5929\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\n# \u83b7\u53d6\u5f53\u524d\u65e5\u671f\ncurrent_date = datetime.now()\n# \u51cf\u53bb\u4e00\u5929\nyesterday = current_date - timedelta(days=1)\nprint(yesterday.strftime(&#39;%Y-%m-%d&#39;))\n<\/code><\/pre>\n<p>\u6b64\u4ee3\u7801\u5c06\u8f93\u51fa\u6628\u5929\u7684\u65e5\u671f\uff0c\u683c\u5f0f\u4e3a\u201c\u5e74-\u6708-\u65e5\u201d\u3002<\/p>\n<p><strong>Python\u4e2d\u5982\u4f55\u5904\u7406\u4e0d\u540c\u65f6\u95f4\u683c\u5f0f\u7684\u65e5\u671f\u51cf\u4e00\u5929\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5904\u7406\u4e0d\u540c\u683c\u5f0f\u7684\u65e5\u671f\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>strptime<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65e5\u671f\u5bf9\u8c61\u3002\u51cf\u5c11\u4e00\u5929\u7684\u64cd\u4f5c\u4e0e\u6807\u51c6\u65e5\u671f\u5904\u7406\u76f8\u540c\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\n# \u5047\u8bbe\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32\u65e5\u671f\ndate_string = &quot;2023-10-10&quot;\n# \u8f6c\u6362\u4e3a\u65e5\u671f\u5bf9\u8c61\ndate_object = datetime.strptime(date_string, &#39;%Y-%m-%d&#39;)\n# \u51cf\u53bb\u4e00\u5929\nprevious_day = date_object - timedelta(days=1)\nprint(previous_day.strftime(&#39;%Y-%m-%d&#39;))\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u4f7f\u5f97\u5904\u7406\u7279\u5b9a\u683c\u5f0f\u7684\u65e5\u671f\u53d8\u5f97\u7b80\u5355\u800c\u76f4\u89c2\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u51cf\u53bb\u591a\u4e2a\u5929\u6570\u7684\u65e5\u671f\uff1f<\/strong><br \/>\u82e5\u9700\u8981\u51cf\u53bb\u591a\u4e8e\u4e00\u5929\u7684\u65f6\u95f4\uff0c\u53ef\u4ee5\u5728<code>timedelta<\/code>\u4e2d\u4f20\u5165\u6240\u9700\u7684\u5929\u6570\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u51cf\u53bb7\u5929\uff0c\u53ef\u4ee5\u8fd9\u6837\u5b9e\u73b0\uff1a<\/p>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\n# \u83b7\u53d6\u5f53\u524d\u65e5\u671f\ncurrent_date = datetime.now()\n# \u51cf\u53bb7\u5929\ndays_ago = current_date - timedelta(days=7)\nprint(days_ago.strftime(&#39;%Y-%m-%d&#39;))\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u7075\u6d3b\u4e14\u53ef\u4ee5\u8f7b\u677e\u8c03\u6574\u51cf\u53bb\u7684\u5929\u6570\uff0c\u9002\u7528\u4e8e\u591a\u79cd\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u51cf\u53bb\u4e00\u5929\u7684\u65f6\u95f4\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982\u4f7f\u7528datetime\u6a21\u5757\u4e2d\u7684timedelta\u5bf9\u8c61\u3001\u4f7f\u7528pand [&hellip;]","protected":false},"author":3,"featured_media":1076294,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1076283"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1076283"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1076283\/revisions"}],"predecessor-version":[{"id":1076299,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1076283\/revisions\/1076299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1076294"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1076283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1076283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1076283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}