Re: Create a list of dates for same day of week in a year

2017-06-28 Thread Michael F. Stemper
On 2017-06-28 18:30, Sayth Renshaw wrote: Thoughts or examples? dateutil.rrule is what you may use e.g. In [44]: days[:5], days[-5:] Out[44]: ([datetime.datetime(2017, 6, 28, 23, 58, 11), datetime.datetime(2017, 7, 3, 23, 58, 11), datetime.datetime(2017, 7, 5, 23, 58, 11), datetim

Re: Create a list of dates for same day of week in a year

2017-06-28 Thread Sayth Renshaw
> > Thoughts or examples? > > > dateutil.rrule is what you may use e.g. > > > In [38]: from dateutil import rrule > > In [39]: from datetime import date

Re: Create a list of dates for same day of week in a year

2017-06-27 Thread waldemar . osuch
> Thoughts or examples? > dateutil.rrule is what you may use e.g. In [38]: from dateutil import rrule In [39]: from datetime import date

Re: Create a list of dates for same day of week in a year

2017-06-27 Thread Sayth Renshaw
> > Is there an obvious method I am missing in creating a list of dates? I want > > to get a list of each Saturday and each Wednesday for the year 2017. > > > > It seems and maybe this is where I am wrong but doesn't the datetime > > library already know the dates if yes is there an easy way to

Re: Create a list of dates for same day of week in a year

2017-06-27 Thread Chris Angelico
On Wed, Jun 28, 2017 at 12:48 PM, Sayth Renshaw wrote: > Is there an obvious method I am missing in creating a list of dates? I want > to get a list of each Saturday and each Wednesday for the year 2017. > > It seems and maybe this is where I am wrong but doesn't the datetime library > already k

Create a list of dates for same day of week in a year

2017-06-27 Thread Sayth Renshaw
Afternoon Is there an obvious method I am missing in creating a list of dates? I want to get a list of each Saturday and each Wednesday for the year 2017. It seems and maybe this is where I am wrong but doesn't the datetime library already know the dates if yes is there an easy way to query it?