Function for fetching what months between two dates

Hello, Greetings! I have the following idea of adding a function in Lib/datetime.py which when called with the datetime.date object returns the months between the object datetime.date and the object datetime.date passed as the date_to argument in function. Herewith is the attached link to the commit: https://github.com/python/cpython/pull/23713/commits/2941fe88bd9c0c1a5c8ddd4... Kind regards,

Hi. Bundling this into the standard library doesn't seem to provide any real advantage over defining it as a free-standing utility function in your own code. And if it's in your own code you can easily tweak it if you need to :)

Hi. Bundling this into the standard library doesn't seem to provide any real advantage over defining it as a free-standing utility function in your own code. And if it's in your own code you can easily tweak it if you need to :)
participants (4)
-
Marco Sulla
-
qaidjoharbarbhaya@gmail.com
-
Steven D'Aprano
-
Valentin Berlier