Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'subject:number': 0.07; 'thats': 0.07; 'wednesday,': 0.07; 'subject:How': 0.09; 'may,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'weeks,': 0.09; '2014': 0.16; '26th': 0.16; '28th': 0.16; 'clear.': 0.16; 'delighted': 0.16; 'expecting': 0.16; 'inputs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sebastian': 0.16; 'subject:between': 0.16; 'subject:dates': 0.16; 'subject:weeks': 0.16; 'wrote:': 0.16; 'language': 0.19; 'lawrence': 0.22; 'precise': 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'written': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; "doesn't": 0.28; '12th': 0.29; 'function': 0.30; 'code': 0.31; 'language.': 0.32; 'point': 0.33; 'weeks': 0.34; 'subject:?': 0.34; 'to:addr:python-list': 0.35; 'two': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'say': 0.38; 'mean': 0.38; 'enough': 0.39; 'to:addr:python.org': 0.39; 'mark': 0.40; 'hope': 0.61; "you've": 0.61; 'show': 0.62; 'total': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; 'python-list': 0.66; '21st': 0.76; 'cheung': 0.84; 'pythonistas,': 0.84; 'subject:find': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: How to find number of whole weeks between dates? Date: Wed, 10 Jun 2015 21:26:01 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-27-224.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433967979 news.xs4all.nl 2827 [2001:888:2000:d::a6]:40317 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92425 On 10/06/2015 21:11, Sebastian M Cheung via Python-list wrote: > On Wednesday, June 10, 2015 at 6:06:09 PM UTC+1, Sebastian M Cheung wrote: >> Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May would be 5th, 12th and 19th. So expecting 7 whole weeks in total > > What I mean is given two dates I want to find WHOLE weeks, so if given the 2014 calendar and function has two inputs (4th and 5th month) then 7th, 14th, 21st and 28th from April with 28th April week carrying into May, and then 5th, 12th and 19th May to give total of 7 whole weeks, because 26th May is not a whole week and will not be counted. > > Hope thats clear. > If you'd be kind enough to show the code that you've written and the precise reasons(s) that it doesn't work then we'll be delighted to point you in the right direction. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence