@@ -680,6 +680,8 @@ msgid ""
680680"support certain additions and subtractions with :class:`date` and "
681681":class:`.datetime` objects (see below)."
682682msgstr ""
683+ "除了上面列举的操作以外,:class:`timedelta` 对象还支持与 :class:`date` 和 :class:`.datetime` "
684+ "对象进行特定的相加和相减运算(见下文)。"
683685
684686#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:378
685687msgid ""
@@ -688,30 +690,34 @@ msgid ""
688690" the :func:`divmod` function. True division and multiplication of a "
689691":class:`timedelta` object by a :class:`float` object are now supported."
690692msgstr ""
693+ "现在已支持 :class:`timedelta` 对象与另一个 :class:`timedelta` 对象相整除或相除,包括求余运算和 "
694+ ":func:`divmod` 函数。 现在也支持 :class:`timedelta` 对象加上或乘以一个 :class:`float` 对象。"
691695
692696#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:385
693697msgid ""
694698"Comparisons of :class:`timedelta` objects are supported, with some caveats."
695- msgstr ""
699+ msgstr "支持 :class:`timedelta` 对象之间进行比较,但其中有一些注意事项。 "
696700
697701#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:387
698702msgid ""
699703"The comparisons ``==`` or ``!=`` *always* return a :class:`bool`, no matter "
700704"the type of the compared object::"
701- msgstr ""
705+ msgstr "``==`` 或 ``!=`` 比较 *总是* 返回一个 :class:`bool` 对象,无论被比较的对象是什么类型:: "
702706
703707#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:398
704708msgid ""
705709"For all other comparisons (such as ``<`` and ``>``), when a "
706710":class:`timedelta` object is compared to an object of a different type, "
707711":exc:`TypeError` is raised::"
708712msgstr ""
713+ "对于所有其他比较 (例如 ``<`` 和 ``>``),当一个 :class:`timedelta` 对象与其他类型的对象比较时,将引发 "
714+ ":exc:`TypeError`::"
709715
710716#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:409
711717msgid ""
712718"In Boolean contexts, a :class:`timedelta` object is considered to be true if"
713719" and only if it isn't equal to ``timedelta(0)``."
714- msgstr ""
720+ msgstr "在布尔运算中,:class:`timedelta` 对象当且仅当其不等于 ``timedelta(0)`` 时则会被视为真值。 "
715721
716722#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:412
717723#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:621
@@ -741,11 +747,11 @@ msgstr "class:`timedelta` 用法示例"
741747
742748#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:428
743749msgid "An additional example of normalization::"
744- msgstr ""
750+ msgstr "一个标准化的附加示例:: "
745751
746752#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:440
747753msgid "Examples of :class:`timedelta` arithmetic::"
748- msgstr ""
754+ msgstr ":class:`timedelta` 算术运算的示例:: "
749755
750756#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:459
751757msgid ":class:`date` Objects"
@@ -756,19 +762,19 @@ msgid ""
756762"A :class:`date` object represents a date (year, month and day) in an "
757763"idealized calendar, the current Gregorian calendar indefinitely extended in "
758764"both directions."
759- msgstr ""
765+ msgstr ":class:`date` 对象代表一个理想化历法中的日期(年、月和日),即当今的格列高利历向前后两个方向无限延伸。 "
760766
761767#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:465
762768msgid ""
763769"January 1 of year 1 is called day number 1, January 2 of year 1 is called "
764770"day number 2, and so on. [#]_"
765- msgstr ""
771+ msgstr "公元 1 年 1 月 1日是第 1 日,公元 1 年 1 月 2 日是第 2 日,依此类推。 [#]_ "
766772
767773#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:470
768774msgid ""
769775"All arguments are required. Arguments must be integers, in the following "
770776"ranges:"
771- msgstr ""
777+ msgstr "所有参数都是必要的。 参数必须是在下面范围内的整数: "
772778
773779#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:473
774780msgid "``MINYEAR <= year <= MAXYEAR``"
@@ -799,13 +805,13 @@ msgstr "返回当前的本地日期。"
799805
800806#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:486
801807msgid "This is equivalent to ``date.fromtimestamp(time.time())``."
802- msgstr ""
808+ msgstr "这等价于 ``date.fromtimestamp(time.time())``。 "
803809
804810#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:490
805811msgid ""
806812"Return the local date corresponding to the POSIX timestamp, such as is "
807813"returned by :func:`time.time`."
808- msgstr ""
814+ msgstr "返回对应于 POSIX 时间戳的当地时间,例如 :func:`time.time` 返回的就是时间戳。 "
809815
810816#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:493
811817msgid ""
@@ -816,6 +822,9 @@ msgid ""
816822"that include leap seconds in their notion of a timestamp, leap seconds are "
817823"ignored by :meth:`fromtimestamp`."
818824msgstr ""
825+ "这可能引发 :exc:`OverflowError`,如果时间戳数值超出所在平台 C :c:func:`localtime` "
826+ "函数的支持范围的话,并且会在 :c:func:`localtime` 出错时引发 :exc:`OSError`。 通常该数值会被限制在 1970 年至 "
827+ "2038 年之间。 请注意在时间戳概念包含闰秒的非 POSIX 系统上,闰秒会被 :meth:`fromtimestamp` 所忽略。"
819828
820829#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:500
821830msgid ""
@@ -832,25 +841,27 @@ msgstr ""
832841msgid ""
833842"Return the date corresponding to the proleptic Gregorian ordinal, where "
834843"January 1 of year 1 has ordinal 1."
835- msgstr ""
844+ msgstr "返回对应于预期格列高利历序号的日期,其中公元 1 年 1 月 1 晶的序号为 1。 "
836845
837846#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:512
838847msgid ""
839848":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``."
840849" For any date *d*, ``date.fromordinal(d.toordinal()) == d``."
841850msgstr ""
851+ "除非 ``1 <= ordinal <= date.max.toordinal()`` 否则会引发 :exc:`ValueError`。对于任意日期 "
852+ "*d*,``date.fromordinal(d.toordinal()) == d``。"
842853
843854#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:519
844855msgid ""
845856"Return a :class:`date` corresponding to a *date_string* given in the format "
846857"``YYYY-MM-DD``::"
847- msgstr ""
858+ msgstr "返回一个对应于以 ``YYYY-MM-DD`` 格式给出的 *date_string* 的 :class:`date` 对象:: "
848859
849860#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:526
850861msgid ""
851862"This is the inverse of :meth:`date.isoformat`. It only supports the format "
852863"``YYYY-MM-DD``."
853- msgstr ""
864+ msgstr "这是 :meth:`date.isoformat` 的逆操作。 它只支持 ``YYYY-MM-DD`` 格式。 "
854865
855866#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:534
856867msgid ""
@@ -896,7 +907,7 @@ msgstr "``date2 = date1 + timedelta``"
896907
897908#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:580
898909msgid "*date2* is ``timedelta.days`` days removed from *date1*. (1)"
899- msgstr ""
910+ msgstr "*date2* 等于从 *date1* 减去 ``timedelta.days`` 天。 (1) "
900911
901912#: /home/travis/build/python/cpython-doc-catalog/Doc/library/datetime.rst:583
902913msgid "``date2 = date1 - timedelta``"
0 commit comments