mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 08:21:41 +08:00
移除零宽空格
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"titleSlug": "reformat-date",
|
||||
"content": "<p>Given a <code>date</code> string in the form <code>Day Month Year</code>, where:</p>\n\n<ul>\n\t<li><code>Day</code> is in the set <code>{"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}</code>.</li>\n\t<li><code>Month</code> is in the set <code>{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}</code>.</li>\n\t<li><code>Year</code> is in the range <code>[1900, 2100]</code>.</li>\n</ul>\n\n<p>Convert the date string to the format <code>YYYY-MM-DD</code>, where:</p>\n\n<ul>\n\t<li><code>YYYY</code> denotes the 4 digit year.</li>\n\t<li><code>MM</code> denotes the 2 digit month.</li>\n\t<li><code>DD</code> denotes the 2 digit day.</li>\n</ul>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> date = "20th Oct 2052"\n<strong>Output:</strong> "2052-10-20"\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> date = "6th Jun 1933"\n<strong>Output:</strong> "1933-06-06"\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> date = "26th May 1960"\n<strong>Output:</strong> "1960-05-26"\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li>The given dates are guaranteed to be valid, so no error handling is necessary.</li>\n</ul>\n",
|
||||
"translatedTitle": "转变日期格式",
|
||||
"translatedContent": "<p>给你一个字符串 <code>date</code> ,它的格式为 <code>Day Month Year</code> ,其中:</p>\n\n<ul>\n\t<li><code>Day</code> 是集合 <code>{"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}</code> 中的一个元素。</li>\n\t<li><code>Month</code> 是集合 <code>{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}</code> 中的一个元素。</li>\n\t<li><code>Year</code> 的范围在 <code>[1900, 2100]</code> 之间。</li>\n</ul>\n\n<p>请你将字符串转变为 <code>YYYY-MM-DD</code> 的格式,其中:</p>\n\n<ul>\n\t<li><code>YYYY</code> 表示 4 位的年份。</li>\n\t<li><code>MM</code> 表示 2 位的月份。</li>\n\t<li><code>DD</code> 表示 2 位的天数。</li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>date = "20th Oct 2052"\n<strong>输出:</strong>"2052-10-20"\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>date = "6th Jun 1933"\n<strong>输出:</strong>"1933-06-06"\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>date = "26th May 1960"\n<strong>输出:</strong>"1960-05-26"\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>给定日期保证是合法的,所以不需要处理异常输入。</li>\n</ul>\n",
|
||||
"translatedContent": "<p>给你一个字符串 <code>date</code> ,它的格式为 <code>Day Month Year</code> ,其中:</p>\n\n<ul>\n\t<li><code>Day</code> 是集合 <code>{"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}</code> 中的一个元素。</li>\n\t<li><code>Month</code> 是集合 <code>{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}</code> 中的一个元素。</li>\n\t<li><code>Year</code> 的范围在 <code>[1900, 2100]</code> 之间。</li>\n</ul>\n\n<p>请你将字符串转变为 <code>YYYY-MM-DD</code> 的格式,其中:</p>\n\n<ul>\n\t<li><code>YYYY</code> 表示 4 位的年份。</li>\n\t<li><code>MM</code> 表示 2 位的月份。</li>\n\t<li><code>DD</code> 表示 2 位的天数。</li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>date = "20th Oct 2052"\n<strong>输出:</strong>"2052-10-20"\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>date = "6th Jun 1933"\n<strong>输出:</strong>"1933-06-06"\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>date = "26th May 1960"\n<strong>输出:</strong>"1960-05-26"\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>给定日期保证是合法的,所以不需要处理异常输入。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 24,
|
||||
|
Reference in New Issue
Block a user