On Tue, 15 Dec 2020 at 15:32, Steven D'Aprano <st...@pearwood.info> wrote: > > On Tue, Dec 15, 2020 at 03:08:51AM -0000, qaidjoharbarbh...@gmail.com wrote: > > 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. > > What is this function used for? > > I see it returns a list of (year, month_number) tuples. Once I have > collected those (year, month) tuples, what do I do with them?
It will be more useful if the returned values are datetime.date objects. The library arrow has arrow.Arrow.range("month", startdate, enddate) _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/X55X3DWMYPV6NQYOBI6PL7PRSSNSLWV2/ Code of Conduct: http://python.org/psf/codeofconduct/