Skip to content

Commit a3f562c

Browse files
sync with cpython fdbdd9fb
1 parent 5f37f1c commit a3f562c

File tree

2 files changed

+197
-183
lines changed

2 files changed

+197
-183
lines changed

library/datetime.po

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-01-22 16:55+0000\n"
9+
"POT-Creation-Date: 2026-02-13 00:21+0000\n"
1010
"PO-Revision-Date: 2023-08-07 10:20+0800\n"
1111
"Last-Translator: Griiid <gridwing@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -680,7 +680,7 @@ msgid ""
680680
msgstr ""
681681

682682
#: ../../library/datetime.rst:400 ../../library/datetime.rst:672
683-
#: ../../library/datetime.rst:2696
683+
#: ../../library/datetime.rst:2702
684684
msgid "Notes:"
685685
msgstr "註解:"
686686

@@ -1790,7 +1790,7 @@ msgid ""
17901790
"equivalent to::"
17911791
msgstr ""
17921792

1793-
#: ../../library/datetime.rst:1148 ../../library/datetime.rst:2676
1793+
#: ../../library/datetime.rst:1148 ../../library/datetime.rst:2682
17941794
msgid "datetime(*(time.strptime(date_string, format)[0:6]))"
17951795
msgstr "datetime(*(time.strptime(date_string, format)[0:6]))"
17961796

@@ -2126,7 +2126,7 @@ msgstr ""
21262126

21272127
#: ../../library/datetime.rst:1431 ../../library/datetime.rst:2042
21282128
#: ../../library/datetime.rst:2149 ../../library/datetime.rst:2394
2129-
#: ../../library/datetime.rst:2406 ../../library/datetime.rst:2749
2129+
#: ../../library/datetime.rst:2406 ../../library/datetime.rst:2755
21302130
msgid "The UTC offset is not restricted to a whole number of minutes."
21312131
msgstr ""
21322132

@@ -3947,7 +3947,7 @@ msgstr "000000, 000001, ..., 999999"
39473947
msgid "\\(5)"
39483948
msgstr "\\(5)"
39493949

3950-
#: ../../library/datetime.rst:2545 ../../library/datetime.rst:2737
3950+
#: ../../library/datetime.rst:2545 ../../library/datetime.rst:2743
39513951
msgid "``%z``"
39523952
msgstr "``%z``"
39533953

@@ -3966,7 +3966,7 @@ msgstr ""
39663966
msgid "\\(6)"
39673967
msgstr "\\(6)"
39683968

3969-
#: ../../library/datetime.rst:2550 ../../library/datetime.rst:2763
3969+
#: ../../library/datetime.rst:2550 ../../library/datetime.rst:2769
39703970
msgid "``%Z``"
39713971
msgstr "``%Z``"
39723972

@@ -4134,7 +4134,7 @@ msgstr "01, 02, ..., 53"
41344134
msgid "\\(8), \\(9)"
41354135
msgstr "\\(8), \\(9)"
41364136

4137-
#: ../../library/datetime.rst:2607 ../../library/datetime.rst:2759
4137+
#: ../../library/datetime.rst:2607 ../../library/datetime.rst:2765
41384138
msgid "``%:z``"
41394139
msgstr "``%:z``"
41404140

@@ -4195,13 +4195,21 @@ msgstr ""
41954195

41964196
#: ../../library/datetime.rst:2642
41974197
msgid ""
4198+
"Format strings without separators can be ambiguous for parsing. For example, "
4199+
"with ``%Y%m%d``, the string ``2026111`` may be parsed either as "
4200+
"``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is "
4201+
"parsed as intended."
4202+
msgstr ""
4203+
4204+
#: ../../library/datetime.rst:2648
4205+
msgid ""
41984206
"When used to parse partial dates lacking a year, :meth:`.datetime.strptime` "
41994207
"and :meth:`.date.strptime` will raise when encountering February 29 because "
42004208
"the default year of 1900 is *not* a leap year. Always add a default leap "
42014209
"year to partial date strings before parsing."
42024210
msgstr ""
42034211

4204-
#: ../../library/datetime.rst:2663
4212+
#: ../../library/datetime.rst:2669
42054213
msgid ""
42064214
">>> from datetime import datetime\n"
42074215
">>> value = \"2/29\"\n"
@@ -4213,18 +4221,18 @@ msgid ""
42134221
"datetime.datetime(1904, 2, 29, 0, 0)"
42144222
msgstr ""
42154223

4216-
#: ../../library/datetime.rst:2674
4224+
#: ../../library/datetime.rst:2680
42174225
msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::"
42184226
msgstr ""
42194227

4220-
#: ../../library/datetime.rst:2678
4228+
#: ../../library/datetime.rst:2684
42214229
msgid ""
42224230
"except when the format includes sub-second components or time zone offset "
42234231
"information, which are supported in ``datetime.strptime`` but are discarded "
42244232
"by ``time.strptime``."
42254233
msgstr ""
42264234

4227-
#: ../../library/datetime.rst:2682
4235+
#: ../../library/datetime.rst:2688
42284236
msgid ""
42294237
"For :class:`.time` objects, the format codes for year, month, and day should "
42304238
"not be used, as :class:`!time` objects have no such values. If they're used "
@@ -4234,7 +4242,7 @@ msgstr ""
42344242
"time` 物件並沒有這些值。如果使用這些格式碼,年份會以 1900 代替、月及日會以 1 "
42354243
"代替。"
42364244

4237-
#: ../../library/datetime.rst:2686
4245+
#: ../../library/datetime.rst:2692
42384246
msgid ""
42394247
"For :class:`date` objects, the format codes for hours, minutes, seconds, and "
42404248
"microseconds should not be used, as :class:`date` objects have no such "
@@ -4243,7 +4251,7 @@ msgstr ""
42434251
"對 :class:`.date` 物件來說,不應該使用時、分、秒、微秒的格式碼,因為 :class:"
42444252
"`date` 物件並沒有這些值。如果使用這些格式碼,這些值都會以 0 代替。"
42454253

4246-
#: ../../library/datetime.rst:2690
4254+
#: ../../library/datetime.rst:2696
42474255
msgid ""
42484256
"For the same reason, handling of format strings containing Unicode code "
42494257
"points that can't be represented in the charset of the current locale is "
@@ -4252,64 +4260,64 @@ msgid ""
42524260
"`UnicodeError` or return an empty string instead."
42534261
msgstr ""
42544262

4255-
#: ../../library/datetime.rst:2699
4263+
#: ../../library/datetime.rst:2705
42564264
msgid ""
42574265
"Because the format depends on the current locale, care should be taken when "
42584266
"making assumptions about the output value. Field orderings will vary (for "
42594267
"example, \"month/day/year\" versus \"day/month/year\"), and the output may "
42604268
"contain non-ASCII characters."
42614269
msgstr ""
42624270

4263-
#: ../../library/datetime.rst:2705
4271+
#: ../../library/datetime.rst:2711
42644272
msgid ""
42654273
"The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] "
42664274
"range, but years < 1000 must be zero-filled to 4-digit width."
42674275
msgstr ""
42684276

4269-
#: ../../library/datetime.rst:2708
4277+
#: ../../library/datetime.rst:2714
42704278
msgid ""
42714279
"In previous versions, :meth:`~.datetime.strftime` method was restricted to "
42724280
"years >= 1900."
42734281
msgstr ""
42744282

4275-
#: ../../library/datetime.rst:2712
4283+
#: ../../library/datetime.rst:2718
42764284
msgid ""
42774285
"In version 3.2, :meth:`~.datetime.strftime` method was restricted to years "
42784286
">= 1000."
42794287
msgstr ""
42804288

4281-
#: ../../library/datetime.rst:2717
4289+
#: ../../library/datetime.rst:2723
42824290
msgid ""
42834291
"When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive "
42844292
"only affects the output hour field if the ``%I`` directive is used to parse "
42854293
"the hour."
42864294
msgstr ""
42874295

4288-
#: ../../library/datetime.rst:2721
4296+
#: ../../library/datetime.rst:2727
42894297
msgid ""
42904298
"Unlike the :mod:`time` module, the :mod:`!datetime` module does not support "
42914299
"leap seconds."
42924300
msgstr ""
42934301

4294-
#: ../../library/datetime.rst:2725
4302+
#: ../../library/datetime.rst:2731
42954303
msgid ""
42964304
"When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive "
42974305
"accepts from one to six digits and zero pads on the right. ``%f`` is an "
42984306
"extension to the set of format characters in the C standard (but implemented "
42994307
"separately in datetime objects, and therefore always available)."
43004308
msgstr ""
43014309

4302-
#: ../../library/datetime.rst:2732
4310+
#: ../../library/datetime.rst:2738
43034311
msgid ""
43044312
"For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced "
43054313
"by empty strings."
43064314
msgstr ""
43074315

4308-
#: ../../library/datetime.rst:2735
4316+
#: ../../library/datetime.rst:2741
43094317
msgid "For an aware object:"
43104318
msgstr ""
43114319

4312-
#: ../../library/datetime.rst:2738
4320+
#: ../../library/datetime.rst:2744
43134321
msgid ""
43144322
":meth:`~.datetime.utcoffset` is transformed into a string of the form "
43154323
"``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number "
@@ -4323,7 +4331,7 @@ msgid ""
43234331
"replaced with the string ``'-0330'``."
43244332
msgstr ""
43254333

4326-
#: ../../library/datetime.rst:2752
4334+
#: ../../library/datetime.rst:2758
43274335
msgid ""
43284336
"When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` "
43294337
"method, the UTC offsets can have a colon as a separator between hours, "
@@ -4332,69 +4340,69 @@ msgid ""
43324340
"``'+00:00'``."
43334341
msgstr ""
43344342

4335-
#: ../../library/datetime.rst:2760
4343+
#: ../../library/datetime.rst:2766
43364344
msgid ""
43374345
"Behaves exactly as ``%z``, but has a colon separator added between hours, "
43384346
"minutes and seconds."
43394347
msgstr ""
43404348

4341-
#: ../../library/datetime.rst:2764
4349+
#: ../../library/datetime.rst:2770
43424350
msgid ""
43434351
"In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string if :"
43444352
"meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced by "
43454353
"the returned value, which must be a string."
43464354
msgstr ""
43474355

4348-
#: ../../library/datetime.rst:2768
4356+
#: ../../library/datetime.rst:2774
43494357
msgid ":meth:`~.datetime.strptime` only accepts certain values for ``%Z``:"
43504358
msgstr ""
43514359

4352-
#: ../../library/datetime.rst:2770
4360+
#: ../../library/datetime.rst:2776
43534361
msgid "any value in ``time.tzname`` for your machine's locale"
43544362
msgstr ""
43554363

4356-
#: ../../library/datetime.rst:2771
4364+
#: ../../library/datetime.rst:2777
43574365
msgid "the hard-coded values ``UTC`` and ``GMT``"
43584366
msgstr ""
43594367

4360-
#: ../../library/datetime.rst:2773
4368+
#: ../../library/datetime.rst:2779
43614369
msgid ""
43624370
"So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid "
43634371
"values, but probably not ``EST``. It will raise ``ValueError`` for invalid "
43644372
"values."
43654373
msgstr ""
43664374

4367-
#: ../../library/datetime.rst:2777
4375+
#: ../../library/datetime.rst:2783
43684376
msgid ""
43694377
"When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` "
43704378
"method, an aware :class:`.datetime` object will be produced. The ``tzinfo`` "
43714379
"of the result will be set to a :class:`timezone` instance."
43724380
msgstr ""
43734381

4374-
#: ../../library/datetime.rst:2783
4382+
#: ../../library/datetime.rst:2789
43754383
msgid ""
43764384
"When used with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are "
43774385
"only used in calculations when the day of the week and the calendar year "
43784386
"(``%Y``) are specified."
43794387
msgstr ""
43804388

4381-
#: ../../library/datetime.rst:2788
4389+
#: ../../library/datetime.rst:2794
43824390
msgid ""
43834391
"Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the "
43844392
"day of the week and the ISO year (``%G``) are specified in a :meth:`~."
43854393
"datetime.strptime` format string. Also note that ``%G`` and ``%Y`` are not "
43864394
"interchangeable."
43874395
msgstr ""
43884396

4389-
#: ../../library/datetime.rst:2794
4397+
#: ../../library/datetime.rst:2800
43904398
msgid ""
43914399
"When used with the :meth:`~.datetime.strptime` method, the leading zero is "
43924400
"optional for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, "
43934401
"``%j``, ``%U``, ``%W``, and ``%V``. Format ``%y`` does require a leading "
43944402
"zero."
43954403
msgstr ""
43964404

4397-
#: ../../library/datetime.rst:2799
4405+
#: ../../library/datetime.rst:2805
43984406
msgid ""
43994407
"When parsing a month and day using :meth:`~.datetime.strptime`, always "
44004408
"include a year in the format. If the value you need to parse lacks a year, "
@@ -4403,7 +4411,7 @@ msgid ""
44034411
"parser (1900) is not a leap year. Users run into that bug every leap year."
44044412
msgstr ""
44054413

4406-
#: ../../library/datetime.rst:2805
4414+
#: ../../library/datetime.rst:2811
44074415
msgid ""
44084416
">>> month_day = \"02/29\"\n"
44094417
">>> datetime.strptime(f\"{month_day};1984\", \"%m/%d;%Y\") # No leap year "
@@ -4415,23 +4423,23 @@ msgstr ""
44154423
"題。\n"
44164424
"datetime.datetime(1984, 2, 29, 0, 0)"
44174425

4418-
#: ../../library/datetime.rst:2811
4426+
#: ../../library/datetime.rst:2817
44194427
msgid ""
44204428
":meth:`~.datetime.strptime` calls using a format string containing a day of "
44214429
"month without a year now emit a :exc:`DeprecationWarning`. In 3.15 or later "
44224430
"we may change this into an error or change the default year to a leap year. "
44234431
"See :gh:`70647`."
44244432
msgstr ""
44254433

4426-
#: ../../library/datetime.rst:2818
4434+
#: ../../library/datetime.rst:2824
44274435
msgid "Footnotes"
44284436
msgstr "註解"
44294437

4430-
#: ../../library/datetime.rst:2819
4438+
#: ../../library/datetime.rst:2825
44314439
msgid "If, that is, we ignore the effects of Relativity"
44324440
msgstr "也就是說,我們會忽略相對論的效應"
44334441

4434-
#: ../../library/datetime.rst:2821
4442+
#: ../../library/datetime.rst:2827
44354443
msgid ""
44364444
"This matches the definition of the \"proleptic Gregorian\" calendar in "
44374445
"Dershowitz and Reingold's book *Calendrical Calculations*, where it's the "
@@ -4440,7 +4448,7 @@ msgid ""
44404448
"systems."
44414449
msgstr ""
44424450

4443-
#: ../../library/datetime.rst:2827
4451+
#: ../../library/datetime.rst:2833
44444452
msgid ""
44454453
"See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar "
44464454
"<https://web.archive.org/web/20220531051136/https://webspace.science.uu.nl/"

0 commit comments

Comments
 (0)