File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,15 @@ Other constructors, all class methods:
536
536
.. classmethod :: date.fromisoformat(date_string)
537
537
538
538
Return a :class: `date ` corresponding to a *date_string * given in any valid
539
- ISO 8601 format, except ordinal dates (e.g. ``YYYY-DDD ``)::
539
+ ISO 8601 format, with the following exceptions:
540
+
541
+ 1. Reduced precision dates are not currently supported (``YYYY-MM ``,
542
+ ``YYYY ``).
543
+ 2. Extended date representations are not currently supported
544
+ (``±YYYYYY-MM-DD ``).
545
+ 3. Ordinal dates are not currently supported (``YYYY-OOO ``).
546
+
547
+ Examples::
540
548
541
549
>>> from datetime import date
542
550
>>> date.fromisoformat('2019-12-04')
@@ -1006,8 +1014,12 @@ Other constructors, all class methods:
1006
1014
1007
1015
1. Time zone offsets may have fractional seconds.
1008
1016
2. The ``T `` separator may be replaced by any single unicode character.
1009
- 3. Ordinal dates are not currently supported.
1010
- 4. Fractional hours and minutes are not supported.
1017
+ 3. Fractional hours and minutes are not supported.
1018
+ 4. Reduced precision dates are not currently supported (``YYYY-MM ``,
1019
+ ``YYYY ``).
1020
+ 5. Extended date representations are not currently supported
1021
+ (``±YYYYYY-MM-DD ``).
1022
+ 6. Ordinal dates are not currently supported (``YYYY-OOO ``).
1011
1023
1012
1024
Examples::
1013
1025
You can’t perform that action at this time.
0 commit comments