Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59095

dateutil.relativedelta.WE and friends?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.125
X-Spam-Level *
X-Spam-Evidence '*H*': 0.76; '*S*': 0.01; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'sender:addr:gmail.com': 0.17; 'import': 0.22; 'rules': 0.22; 'wednesday': 0.24; 'message- id:@mail.gmail.com': 0.30; 'third': 0.33; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'dates': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'series': 0.66; 'subject:friends': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=BATYRnU2vLY8t9r3vrF41ZIZM2IxrTXfPGcw+9Hw1lo=; b=dSpK2LECaoWy/VZz/KEjA9CFMnY+LrczbCyojRsBTv3SaNAdRi9/wAkjYsxJn7VHZ2 8ec5PKVpp8BB0aOPrLhVX+3yxOksF4KHGb4e4VJGitHA2QRVpA12qGU5H6oEwZTbMOng 4po8htXwm8RQcudU8SxFEb0lmY9S9TkWKo0dm37oRU+Y0PlixdD3stAih0+aM7CVcuSu v+2nWBtEe1k48CfOrVzq+pKEUXlHEns25k5zF5pyp4bMwmYa27iJG4g4zRhcxh/OTCyN tqc/1z10XrnGPzq0fJEqFirdXvYdJ2n3ZsJ87jHK2h3O6eClPycWSJ7yThmk4dgNaPoI j6Kw==
MIME-Version 1.0
X-Received by 10.50.57.115 with SMTP id h19mr13956309igq.2.1384201989938; Mon, 11 Nov 2013 12:33:09 -0800 (PST)
Sender skip.montanaro@gmail.com
Date Mon, 11 Nov 2013 14:33:09 -0600
X-Google-Sender-Auth Aguz1MNdKy-Dh-FBC7r3Y_2aV50
Subject dateutil.relativedelta.WE and friends?
From Skip Montanaro <skip@pobox.com>
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2395.1384201993.18130.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1384201993 news.xs4all.nl 15907 [2001:888:2000:d::a6]:33539
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:59095

Show key headers only | View raw


I found a rather inscrutable use of dateutil recurrence rules in
StackOverflow which generates a series of dates corresponding to the
third Wednesday of the  month:

    import dateutil.rrule as dr
    import dateutil.relativedelta as drel

    dt = datetime.datetime(2012, 1, 1, 0, 0)
    rule = dr.rrule(dr.MONTHLY, byweekday=drel.WE(3), dtstart=dt, count=12)

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

dateutil.relativedelta.WE and friends? Skip Montanaro <skip@pobox.com> - 2013-11-11 14:33 -0600

csiph-web