Browse Source
bpo-36004: Add date.fromisocalendar (GH-11888)
bpo-36004: Add date.fromisocalendar (GH-11888)
This commit implements the first version of date.fromisocalendar, the inverse function for date.isocalendar.pull/13011/head
committed by
Victor Stinner
6 changed files with 209 additions and 0 deletions
-
17Doc/library/datetime.rst
-
10Doc/whatsnew/3.8.rst
-
35Lib/datetime.py
-
76Lib/test/datetimetester.py
-
4Misc/NEWS.d/next/Library/2019-02-17-12-55-51.bpo-36004.hCt_KK.rst
-
67Modules/_datetimemodule.c
@ -0,0 +1,4 @@ |
|||
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and |
|||
:meth:`datetime.datetime.fromisocalendar`, which construct date objects from |
|||
ISO year, week number and weekday; these are the inverse of each class's |
|||
``isocalendar`` method. Patch by Paul Ganssle. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue