Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:number': 0.07; 'wednesday,': 0.07; 'subject:How': 0.09; 'may,': 0.09; 'weeks,': 0.09; 'wed,': 0.15; '2014': 0.16; '26th': 0.16; '28th': 0.16; 'expecting': 0.16; 'inputs': 0.16; 'sebastian': 0.16; 'subject:between': 0.16; 'subject:dates': 0.16; 'subject:weeks': 0.16; 'wrote:': 0.16; 'suggested': 0.20; '2015': 0.23; 'module': 0.23; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.28; 'this.': 0.28; '12th': 0.29; 'function': 0.30; 'weeks': 0.34; 'subject:?': 0.34; 'received:google.com': 0.34; 'useful': 0.35; 'to:addr:python-list': 0.35; 'being': 0.36; 'two': 0.37; 'should': 0.37; 'subject:: ': 0.37; 'say': 0.38; 'mean': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'total': 0.64; 'python- list': 0.66; '21st': 0.76; 'cheung': 0.84; 'to:name:python': 0.84; 'months?': 0.91; 'subject:find': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=tq8O57FBapSS6WiGPTqGdalRUoASVbgqrHAqFSLIYas=; b=yh6/wZ6IQzqBICfXTSSXNQOn8LwoPAfY5yNQbLJm7ndyJpPjQ/7KvqBNi0E5eE28oH qM+Xrg9QaCkjtLyKNufc2NBNGMeEi63VZvJnuTIKfhk4XSdvn86EQpeXcYzs9W7Ko6SP 7qkUH8bSMX08fvMg08ZBAVLEuDLEe+wcFzEkIBkRL6KxPrRKeb4oAGR/5S02FigOQima u6Rm0v86TuWCVa1xmlSPzGgG5ol3763LlhxKoT08ufXTgmsU4GCNQEo2A4q5M0OgvMdQ o3yDYvQlvNfuhVgjoDThCJ1csDA+KizqwRrqZKNUTuJXbYUPDjtNN1lJt6LXDI8i6wYS um1g== X-Received: by 10.13.251.199 with SMTP id l190mr6904872ywf.148.1433968443242; Wed, 10 Jun 2015 13:34:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Wed, 10 Jun 2015 14:33:22 -0600 Subject: Re: How to find number of whole weeks between dates? To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433968445 news.xs4all.nl 2908 [2001:888:2000:d::a6]:43597 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92426 On Wed, Jun 10, 2015 at 2:11 PM, 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 th= e 2014 calendar and function has two inputs (4th and 5th month) then 7th, 1= 4th, 21st and 28th from April with 28th April week carrying into May, and t= hen 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. So the two "dates" being passed are actually months? The calendar module already suggested should be useful for this.