<div class="gmail_quote">On Fri, Oct 9, 2009 at 2:16 PM, Glen Zangirolami <span dir="ltr">&lt;<a href="mailto:digitalman66@gmail.com">digitalman66@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

If i have a list of dates:<div>date_list = [&#39;2008-12-29&#39;,&#39;2008-12-31&#39;,&#39;2008-01-01&#39;,&#39;2008-01-02&#39;,&#39;2008-01-03&#39;,&#39;2008-01-05&#39;]</div><div><br></div><div>How do I find the missing dates in the range of dates and insert them into the list so I get?</div>



<div>date_list = [&#39;2008-12-29&#39;,&#39;2008-12-30&#39;,&#39;2008-12-31&#39;,&#39;2008-01-01&#39;,&#39;2008-01-02&#39;,&#39;2008-01-03&#39;,&#39;2008-12-04&#39;,&#39;2008-01-05&#39;]</div><div><br></div><div>Hopefully the case is that I haven&#39;t found the correct python module that does it ;)</div>

</blockquote><div><br></div><div>The datetime module exists... you could easily write a function that does something along the lines of:</div><div><br></div><div>def date_range(startdate, enddate):</div><div>     #do something here to make a range of dates</div>

<div><br></div><div>though you may want to write a function that checks for a missing date first.</div><div><br></div><div>HTH,</div><div>Wayne</div></div>