<div dir="ltr"><div>There are all sorts of "Calendar" operations one might want -- I think those belong in a separate library, rather than a few tacked on to datetime.</div><div><br></div><div>-CHB</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 2:48 AM Robert Vanden Eynde <<a href="mailto:robertve92@gmail.com">robertve92@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Currently one can do week = d.isocalendar()[1]<div dir="auto"><br></div><div dir="auto">The iso definition of a week number has some nice properties.<br><div dir="auto"><br><div dir="auto"><a href="http://robertvandeneynde.be" target="_blank">robertvandeneynde.be</a></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 1 Mar 2019, 11:44 Antonio Galán, <<a href="mailto:angala.agl@gmail.com" target="_blank">angala.agl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div>The week number is usually refered to the week of the year, but the week of the month is also interesting, for example for some holiday which depend on the week number of the month, so in analogy with "weekday" we can use "yearweek" and "monthweek"<br><div class="gmail_quote"><div dir="ltr">El vie., 1 de marzo de 2019 9:33, Adrien Ricocotam <<a href="mailto:ricocotam@gmail.com" rel="noreferrer noreferrer" target="_blank">ricocotam@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">I like the idea. But how to distinguish it from the number of week past since the beginning of the month ?</div></div><div dir="auto"><br></div><div dir="auto">But that’s great. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri 1 Mar 2019 at 09:31, Antonio Galán <<a href="mailto:angala.agl@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">angala.agl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div class="gmail_quote"><div dir="auto"><div dir="ltr">Hi, datetime.date.today() (or other day)  has attributes .year and .month wich return the year and the month of that date, also it has a function weekday() wich return the number of the day in the week.<div><br></div><div>I think it is a good idea add a function or attribute "week" wich return the number of the week on the year. It is useful to execute scripts once a week for example.</div></div></div>
</div></div></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" rel="noreferrer noreferrer noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div>
</blockquote></div></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" rel="noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Christopher Barker, PhD<br><br> Python Language Consulting<br>  - Teaching<br>  - Scientific Software Development<br>  - Desktop GUI and Web Development<br>  - wxPython, numpy, scipy, Cython<br></div>