Visitar URL original
gh-99032: datetime docs: Encoding is no longer relevant by wjandrea · Pull Request #93365 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: datetime: Encoding is no longer relevant
The `.strftime()` methods return a Unicode string as of Python 3.0.
  • Loading branch information
wjandrea authored May 30, 2022
commit 36f39464e571def702929a6d5e117ebba9d88b68
6 changes: 1 addition & 5 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2496,11 +2496,7 @@ Notes:
(1)
Because the format depends on the current locale, care should be taken when
making assumptions about the output value. Field orderings will vary (for
example, "month/day/year" versus "day/month/year"), and the output may
contain Unicode characters encoded using the locale's default encoding (for
example, if the current locale is ``ja_JP``, the default encoding could be
any one of ``eucJP``, ``SJIS``, or ``utf-8``; use :meth:`locale.getlocale`
to determine the current locale's encoding).
example, "month/day/year" versus "day/month/year").
Comment thread
pganssle marked this conversation as resolved.
Outdated

(2)
The :meth:`strptime` method can parse years in the full [1, 9999] range, but
Expand Down