Skip to content

Commit c5d3780

Browse files
Add note
1 parent 72e5b25 commit c5d3780

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/library/datetime.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,6 +2599,14 @@ method. The ISO 8601 year and ISO 8601 week directives are not interchangeable
25992599
with the year and week number directives above. Calling :meth:`~.datetime.strptime` with
26002600
incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`.
26012601

2602+
.. Note::
2603+
Provided input may be split unexpectedly to cope with the provided directives
2604+
in the format string, this aligns with the behaviour of the C implementation.::
2605+
2606+
>>> datetime.strptime('20110817T12','%Y%m%dT%H%M')
2607+
datetime.datetime(2011, 8, 17, 1, 2)
2608+
2609+
26022610
The full set of format codes supported varies across platforms, because Python
26032611
calls the platform C library's :c:func:`strftime` function, and platform
26042612
variations are common. To see the full set of format codes supported on your

0 commit comments

Comments
 (0)