Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added python dateutil for date parsing

  • Loading branch information...
commit 8d6bde61cca615dcc5645d895b73d046f21bfc9c 1 parent 210e230
Fred Wenzel fwenzel authored

Showing 34 changed files with 10,463 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  mdn.pth
  2. +259 0 packages/python-dateutil/LICENSE
  3. +4 0 packages/python-dateutil/MANIFEST.in
  4. +25 0 packages/python-dateutil/Makefile
  5. +143 0 packages/python-dateutil/NEWS
  6. +12 0 packages/python-dateutil/PKG-INFO
  7. +1,970 0 packages/python-dateutil/README
  8. +9 0 packages/python-dateutil/dateutil/__init__.py
  9. +92 0 packages/python-dateutil/dateutil/easter.py
  10. +886 0 packages/python-dateutil/dateutil/parser.py
  11. +432 0 packages/python-dateutil/dateutil/relativedelta.py
  12. +1,097 0 packages/python-dateutil/dateutil/rrule.py
  13. +951 0 packages/python-dateutil/dateutil/tz.py
  14. +180 0 packages/python-dateutil/dateutil/tzwin.py
  15. +87 0 packages/python-dateutil/dateutil/zoneinfo/__init__.py
  16. BIN  packages/python-dateutil/dateutil/zoneinfo/zoneinfo-2010g.tar.gz
  17. +15 0 packages/python-dateutil/example.py
  18. +5 0 packages/python-dateutil/pip-delete-this-directory.txt
  19. +12 0 packages/python-dateutil/pip-egg-info/python_dateutil.egg-info/PKG-INFO
  20. +25 0 packages/python-dateutil/pip-egg-info/python_dateutil.egg-info/SOURCES.txt
  21. +1 0  packages/python-dateutil/pip-egg-info/python_dateutil.egg-info/dependency_links.txt
  22. +1 0  packages/python-dateutil/pip-egg-info/python_dateutil.egg-info/not-zip-safe
  23. +1 0  packages/python-dateutil/pip-egg-info/python_dateutil.egg-info/top_level.txt
  24. +12 0 packages/python-dateutil/python_dateutil.egg-info/PKG-INFO
  25. +26 0 packages/python-dateutil/python_dateutil.egg-info/SOURCES.txt
  26. +1 0  packages/python-dateutil/python_dateutil.egg-info/dependency_links.txt
  27. +1 0  packages/python-dateutil/python_dateutil.egg-info/not-zip-safe
  28. +1 0  packages/python-dateutil/python_dateutil.egg-info/top_level.txt
  29. +16 0 packages/python-dateutil/sandbox/rrulewrapper.py
  30. +157 0 packages/python-dateutil/sandbox/scheduler.py
  31. +8 0 packages/python-dateutil/setup.cfg
  32. +35 0 packages/python-dateutil/setup.py
  33. +3,953 0 packages/python-dateutil/test.py
  34. +45 0 packages/python-dateutil/updatezinfo.py
1  mdn.pth
@@ -5,6 +5,7 @@ packages/GitPython/lib
5 5 packages/jinja2
6 6 packages/jsonpickle
7 7 packages/lockfile
  8 +packages/python-dateutil
8 9 packages/python-memcached
9 10 packages/pytz
10 11 src/commonware
259 packages/python-dateutil/LICENSE
... ... @@ -0,0 +1,259 @@
  1 +A. HISTORY OF THE SOFTWARE
  2 +==========================
  3 +
  4 +Python was created in the early 1990s by Guido van Rossum at Stichting
  5 +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
  6 +as a successor of a language called ABC. Guido remains Python's
  7 +principal author, although it includes many contributions from others.
  8 +
  9 +In 1995, Guido continued his work on Python at the Corporation for
  10 +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
  11 +in Reston, Virginia where he released several versions of the
  12 +software.
  13 +
  14 +In May 2000, Guido and the Python core development team moved to
  15 +BeOpen.com to form the BeOpen PythonLabs team. In October of the same
  16 +year, the PythonLabs team moved to Digital Creations (now Zope
  17 +Corporation, see http://www.zope.com). In 2001, the Python Software
  18 +Foundation (PSF, see http://www.python.org/psf/) was formed, a
  19 +non-profit organization created specifically to own Python-related
  20 +Intellectual Property. Zope Corporation is a sponsoring member of
  21 +the PSF.
  22 +
  23 +All Python releases are Open Source (see http://www.opensource.org for
  24 +the Open Source Definition). Historically, most, but not all, Python
  25 +releases have also been GPL-compatible; the table below summarizes
  26 +the various releases.
  27 +
  28 + Release Derived Year Owner GPL-
  29 + from compatible? (1)
  30 +
  31 + 0.9.0 thru 1.2 1991-1995 CWI yes
  32 + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
  33 + 1.6 1.5.2 2000 CNRI no
  34 + 2.0 1.6 2000 BeOpen.com no
  35 + 1.6.1 1.6 2001 CNRI yes (2)
  36 + 2.1 2.0+1.6.1 2001 PSF no
  37 + 2.0.1 2.0+1.6.1 2001 PSF yes
  38 + 2.1.1 2.1+2.0.1 2001 PSF yes
  39 + 2.2 2.1.1 2001 PSF yes
  40 + 2.1.2 2.1.1 2002 PSF yes
  41 + 2.1.3 2.1.2 2002 PSF yes
  42 + 2.2.1 2.2 2002 PSF yes
  43 + 2.2.2 2.2.1 2002 PSF yes
  44 + 2.2.3 2.2.2 2003 PSF yes
  45 + 2.3 2.2.2 2002-2003 PSF yes
  46 +
  47 +Footnotes:
  48 +
  49 +(1) GPL-compatible doesn't mean that we're distributing Python under
  50 + the GPL. All Python licenses, unlike the GPL, let you distribute
  51 + a modified version without making your changes open source. The
  52 + GPL-compatible licenses make it possible to combine Python with
  53 + other software that is released under the GPL; the others don't.
  54 +
  55 +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
  56 + because its license has a choice of law clause. According to
  57 + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
  58 + is "not incompatible" with the GPL.
  59 +
  60 +Thanks to the many outside volunteers who have worked under Guido's
  61 +direction to make these releases possible.
  62 +
  63 +
  64 +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
  65 +===============================================================
  66 +
  67 +PSF LICENSE AGREEMENT FOR PYTHON 2.3
  68 +------------------------------------
  69 +
  70 +1. This LICENSE AGREEMENT is between the Python Software Foundation
  71 +("PSF"), and the Individual or Organization ("Licensee") accessing and
  72 +otherwise using Python 2.3 software in source or binary form and its
  73 +associated documentation.
  74 +
  75 +2. Subject to the terms and conditions of this License Agreement, PSF
  76 +hereby grants Licensee a nonexclusive, royalty-free, world-wide
  77 +license to reproduce, analyze, test, perform and/or display publicly,
  78 +prepare derivative works, distribute, and otherwise use Python 2.3
  79 +alone or in any derivative version, provided, however, that PSF's
  80 +License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
  81 +2001, 2002, 2003 Python Software Foundation; All Rights Reserved" are
  82 +retained in Python 2.3 alone or in any derivative version prepared by
  83 +Licensee.
  84 +
  85 +3. In the event Licensee prepares a derivative work that is based on
  86 +or incorporates Python 2.3 or any part thereof, and wants to make
  87 +the derivative work available to others as provided herein, then
  88 +Licensee hereby agrees to include in any such work a brief summary of
  89 +the changes made to Python 2.3.
  90 +
  91 +4. PSF is making Python 2.3 available to Licensee on an "AS IS"
  92 +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
  93 +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
  94 +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
  95 +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT
  96 +INFRINGE ANY THIRD PARTY RIGHTS.
  97 +
  98 +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
  99 +2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
  100 +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3,
  101 +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  102 +
  103 +6. This License Agreement will automatically terminate upon a material
  104 +breach of its terms and conditions.
  105 +
  106 +7. Nothing in this License Agreement shall be deemed to create any
  107 +relationship of agency, partnership, or joint venture between PSF and
  108 +Licensee. This License Agreement does not grant permission to use PSF
  109 +trademarks or trade name in a trademark sense to endorse or promote
  110 +products or services of Licensee, or any third party.
  111 +
  112 +8. By copying, installing or otherwise using Python 2.3, Licensee
  113 +agrees to be bound by the terms and conditions of this License
  114 +Agreement.
  115 +
  116 +
  117 +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
  118 +-------------------------------------------
  119 +
  120 +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
  121 +
  122 +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
  123 +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
  124 +Individual or Organization ("Licensee") accessing and otherwise using
  125 +this software in source or binary form and its associated
  126 +documentation ("the Software").
  127 +
  128 +2. Subject to the terms and conditions of this BeOpen Python License
  129 +Agreement, BeOpen hereby grants Licensee a non-exclusive,
  130 +royalty-free, world-wide license to reproduce, analyze, test, perform
  131 +and/or display publicly, prepare derivative works, distribute, and
  132 +otherwise use the Software alone or in any derivative version,
  133 +provided, however, that the BeOpen Python License is retained in the
  134 +Software, alone or in any derivative version prepared by Licensee.
  135 +
  136 +3. BeOpen is making the Software available to Licensee on an "AS IS"
  137 +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
  138 +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
  139 +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
  140 +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
  141 +INFRINGE ANY THIRD PARTY RIGHTS.
  142 +
  143 +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
  144 +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
  145 +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
  146 +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  147 +
  148 +5. This License Agreement will automatically terminate upon a material
  149 +breach of its terms and conditions.
  150 +
  151 +6. This License Agreement shall be governed by and interpreted in all
  152 +respects by the law of the State of California, excluding conflict of
  153 +law provisions. Nothing in this License Agreement shall be deemed to
  154 +create any relationship of agency, partnership, or joint venture
  155 +between BeOpen and Licensee. This License Agreement does not grant
  156 +permission to use BeOpen trademarks or trade names in a trademark
  157 +sense to endorse or promote products or services of Licensee, or any
  158 +third party. As an exception, the "BeOpen Python" logos available at
  159 +http://www.pythonlabs.com/logos.html may be used according to the
  160 +permissions granted on that web page.
  161 +
  162 +7. By copying, installing or otherwise using the software, Licensee
  163 +agrees to be bound by the terms and conditions of this License
  164 +Agreement.
  165 +
  166 +
  167 +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
  168 +---------------------------------------
  169 +
  170 +1. This LICENSE AGREEMENT is between the Corporation for National
  171 +Research Initiatives, having an office at 1895 Preston White Drive,
  172 +Reston, VA 20191 ("CNRI"), and the Individual or Organization
  173 +("Licensee") accessing and otherwise using Python 1.6.1 software in
  174 +source or binary form and its associated documentation.
  175 +
  176 +2. Subject to the terms and conditions of this License Agreement, CNRI
  177 +hereby grants Licensee a nonexclusive, royalty-free, world-wide
  178 +license to reproduce, analyze, test, perform and/or display publicly,
  179 +prepare derivative works, distribute, and otherwise use Python 1.6.1
  180 +alone or in any derivative version, provided, however, that CNRI's
  181 +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
  182 +1995-2001 Corporation for National Research Initiatives; All Rights
  183 +Reserved" are retained in Python 1.6.1 alone or in any derivative
  184 +version prepared by Licensee. Alternately, in lieu of CNRI's License
  185 +Agreement, Licensee may substitute the following text (omitting the
  186 +quotes): "Python 1.6.1 is made available subject to the terms and
  187 +conditions in CNRI's License Agreement. This Agreement together with
  188 +Python 1.6.1 may be located on the Internet using the following
  189 +unique, persistent identifier (known as a handle): 1895.22/1013. This
  190 +Agreement may also be obtained from a proxy server on the Internet
  191 +using the following URL: http://hdl.handle.net/1895.22/1013".
  192 +
  193 +3. In the event Licensee prepares a derivative work that is based on
  194 +or incorporates Python 1.6.1 or any part thereof, and wants to make
  195 +the derivative work available to others as provided herein, then
  196 +Licensee hereby agrees to include in any such work a brief summary of
  197 +the changes made to Python 1.6.1.
  198 +
  199 +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
  200 +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
  201 +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
  202 +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
  203 +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
  204 +INFRINGE ANY THIRD PARTY RIGHTS.
  205 +
  206 +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
  207 +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
  208 +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
  209 +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
  210 +
  211 +6. This License Agreement will automatically terminate upon a material
  212 +breach of its terms and conditions.
  213 +
  214 +7. This License Agreement shall be governed by the federal
  215 +intellectual property law of the United States, including without
  216 +limitation the federal copyright law, and, to the extent such
  217 +U.S. federal law does not apply, by the law of the Commonwealth of
  218 +Virginia, excluding Virginia's conflict of law provisions.
  219 +Notwithstanding the foregoing, with regard to derivative works based
  220 +on Python 1.6.1 that incorporate non-separable material that was
  221 +previously distributed under the GNU General Public License (GPL), the
  222 +law of the Commonwealth of Virginia shall govern this License
  223 +Agreement only as to issues arising under or with respect to
  224 +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
  225 +License Agreement shall be deemed to create any relationship of
  226 +agency, partnership, or joint venture between CNRI and Licensee. This
  227 +License Agreement does not grant permission to use CNRI trademarks or
  228 +trade name in a trademark sense to endorse or promote products or
  229 +services of Licensee, or any third party.
  230 +
  231 +8. By clicking on the "ACCEPT" button where indicated, or by copying,
  232 +installing or otherwise using Python 1.6.1, Licensee agrees to be
  233 +bound by the terms and conditions of this License Agreement.
  234 +
  235 + ACCEPT
  236 +
  237 +
  238 +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
  239 +--------------------------------------------------
  240 +
  241 +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
  242 +The Netherlands. All rights reserved.
  243 +
  244 +Permission to use, copy, modify, and distribute this software and its
  245 +documentation for any purpose and without fee is hereby granted,
  246 +provided that the above copyright notice appear in all copies and that
  247 +both that copyright notice and this permission notice appear in
  248 +supporting documentation, and that the name of Stichting Mathematisch
  249 +Centrum or CWI not be used in advertising or publicity pertaining to
  250 +distribution of the software without specific, written prior
  251 +permission.
  252 +
  253 +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
  254 +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  255 +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
  256 +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  257 +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  258 +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  259 +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4 packages/python-dateutil/MANIFEST.in
... ... @@ -0,0 +1,4 @@
  1 +recursive-include dateutil *.py *.tar.*
  2 +recursive-include sandbox *.py
  3 +include setup.py setup.cfg MANIFEST.in README LICENSE NEWS Makefile
  4 +include test.py example.py
25 packages/python-dateutil/Makefile
... ... @@ -0,0 +1,25 @@
  1 +#
  2 +# Simple wrapper for setup.py script
  3 +#
  4 +
  5 +DESTDIR=/
  6 +PYTHON=python
  7 +
  8 +prefix=/usr
  9 +bindir=$(prefix)/bin
  10 +
  11 +all:
  12 + $(PYTHON) setup.py build
  13 +
  14 +install:
  15 + $(PYTHON) setup.py install \
  16 + --root=$(DESTDIR) \
  17 + --prefix=$(prefix) \
  18 + --install-scripts=$(bindir)
  19 +
  20 +dist:
  21 + $(PYTHON) setup.py sdist
  22 +
  23 +rpm:
  24 + $(PYTHON) setup.py bdist_rpm
  25 +
143 packages/python-dateutil/NEWS
... ... @@ -0,0 +1,143 @@
  1 +
  2 +Version 1.5
  3 +-----------
  4 +
  5 +- As reported by Mathieu Bridon, rrules were matching the bysecond rules
  6 + incorrectly against byminute in some circumstances when the SECONDLY
  7 + frequency was in use, due to a copy & paste bug. The problem has been
  8 + unittested and corrected.
  9 +
  10 +- Adam Ryan reported a problem in the relativedelta implementation which
  11 + affected the yearday parameter in the month of January specifically.
  12 + This has been unittested and fixed.
  13 +
  14 +- Updated timezone information.
  15 +
  16 +
  17 +Version 1.4.1
  18 +-------------
  19 +
  20 +- Updated timezone information.
  21 +
  22 +
  23 +Version 1.4
  24 +-----------
  25 +
  26 +- Fixed another parser precision problem on conversion of decimal seconds
  27 + to microseconds, as reported by Erik Brown. Now these issues are gone
  28 + for real since it's not using floating point arithmetic anymore.
  29 +
  30 +- Fixed case where tzrange.utcoffset and tzrange.dst() might fail due
  31 + to a date being used where a datetime was expected (reported and fixed
  32 + by Lennart Regebro).
  33 +
  34 +- Prevent tzstr from introducing daylight timings in strings that didn't
  35 + specify them (reported by Lennart Regebro).
  36 +
  37 +- Calls like gettz("GMT+3") and gettz("UTC-2") will now return the
  38 + expected values, instead of the TZ variable behavior.
  39 +
  40 +- Fixed DST signal handling in zoneinfo files. Reported by
  41 + Nicholas F. Fabry and John-Mark Gurney.
  42 +
  43 +
  44 +Version 1.3
  45 +-----------
  46 +
  47 +- Fixed precision problem on conversion of decimal seconds to
  48 + microseconds, as reported by Skip Montanaro.
  49 +
  50 +- Fixed bug in constructor of parser, and converted parser classes to
  51 + new-style classes. Original report and patch by Michael Elsd�rfer.
  52 +
  53 +- Initialize tzid and comps in tz.py, to prevent the code from ever
  54 + raising a NameError (even with broken files). Johan Dahlin suggested
  55 + the fix after a pyflakes run.
  56 +
  57 +- Version is now published in dateutil.__version__, as requested
  58 + by Darren Dale.
  59 +
  60 +- All code is compatible with new-style division.
  61 +
  62 +
  63 +Version 1.2
  64 +-----------
  65 +
  66 +- Now tzfile will round timezones to full-minutes if necessary,
  67 + since Python's datetime doesn't support sub-minute offsets.
  68 + Thanks to Ilpo Nyyss�nen for reporting the issue.
  69 +
  70 +- Removed bare string exceptions, as reported and fixed by
  71 + Wilfredo S�nchez Vega.
  72 +
  73 +- Fix bug in leap count parsing (reported and fixed by Eugene Oden).
  74 +
  75 +
  76 +Version 1.1
  77 +-----------
  78 +
  79 +- Fixed rrule byyearday handling. Abramo Bagnara pointed out that
  80 + RFC2445 allows negative numbers.
  81 +
  82 +- Fixed --prefix handling in setup.py (by Sidnei da Silva).
  83 +
  84 +- Now tz.gettz() returns a tzlocal instance when not given any
  85 + arguments and no other timezone information is found.
  86 +
  87 +- Updating timezone information to version 2005q.
  88 +
  89 +
  90 +Version 1.0
  91 +-----------
  92 +
  93 +- Fixed parsing of XXhXXm formatted time after day/month/year
  94 + has been parsed.
  95 +
  96 +- Added patch by Jeffrey Harris optimizing rrule.__contains__.
  97 +
  98 +
  99 +Version 0.9
  100 +-----------
  101 +
  102 +- Fixed pickling of timezone types, as reported by
  103 + Andreas K�hler.
  104 +
  105 +- Implemented internal timezone information with binary
  106 + timezone files [1]. datautil.tz.gettz() function will now
  107 + try to use the system timezone files, and fallback to
  108 + the internal versions. It's also possible to ask for
  109 + the internal versions directly by using
  110 + dateutil.zoneinfo.gettz().
  111 +
  112 +- New tzwin timezone type, allowing access to Windows
  113 + internal timezones (contributed by Jeffrey Harris).
  114 +
  115 +- Fixed parsing of unicode date strings.
  116 +
  117 +- Accept parserinfo instances as the parser constructor
  118 + parameter, besides parserinfo (sub)classes.
  119 +
  120 +- Changed weekday to spell the not-set n value as None
  121 + instead of 0.
  122 +
  123 +- Fixed other reported bugs.
  124 +
  125 +[1] http://www.twinsun.com/tz/tz-link.htm
  126 +
  127 +
  128 +Version 0.5
  129 +-----------
  130 +
  131 +- Removed FREQ_ prefix from rrule frequency constants
  132 + WARNING: this breaks compatibility with previous versions.
  133 +
  134 +- Fixed rrule.between() for cases where "after" is achieved
  135 + before even starting, as reported by Andreas K�hler.
  136 +
  137 +- Fixed two digit zero-year parsing (such as 31-Dec-00), as
  138 + reported by Jim Abramson, and included test case for this.
  139 +
  140 +- Sort exdate and rdate before iterating over them, so that
  141 + it's not necessary to sort them before adding to the rruleset,
  142 + as reported by Nicholas Piper.
  143 +
12 packages/python-dateutil/PKG-INFO
... ... @@ -0,0 +1,12 @@
  1 +Metadata-Version: 1.0
  2 +Name: python-dateutil
  3 +Version: 1.5
  4 +Summary: Extensions to the standard python 2.3+ datetime module
  5 +Home-page: http://labix.org/python-dateutil
  6 +Author: Gustavo Niemeyer
  7 +Author-email: gustavo@niemeyer.net
  8 +License: PSF License
  9 +Description: The dateutil module provides powerful extensions to the standard
  10 + datetime module, available in Python 2.3+.
  11 +
  12 +Platform: UNKNOWN
1,970 packages/python-dateutil/README
... ... @@ -0,0 +1,1970 @@
  1 +## This file is in the moin format. The latest version is found
  2 +## at https://moin.conectiva.com.br/DateUtil
  3 +
  4 +== Contents ==
  5 +[[TableOfContents]]
  6 +
  7 +== Description ==
  8 +The '''dateutil''' module provides powerful extensions to
  9 +the standard '''datetime''' module, available in Python 2.3+.
  10 +
  11 +== Features ==
  12 +
  13 + * Computing of relative deltas (next month, next year,
  14 + next monday, last week of month, etc);
  15 +
  16 + * Computing of relative deltas between two given
  17 + date and/or datetime objects;
  18 +
  19 + * Computing of dates based on very flexible recurrence rules,
  20 + using a superset of the
  21 + [ftp://ftp.rfc-editor.org/in-notes/rfc2445.txt iCalendar]
  22 + specification. Parsing of RFC strings is supported as well.
  23 +
  24 + * Generic parsing of dates in almost any string format;
  25 +
  26 + * Timezone (tzinfo) implementations for tzfile(5) format
  27 + files (/etc/localtime, /usr/share/zoneinfo, etc), TZ
  28 + environment string (in all known formats), iCalendar
  29 + format files, given ranges (with help from relative deltas),
  30 + local machine timezone, fixed offset timezone, UTC timezone,
  31 + and Windows registry-based time zones.
  32 +
  33 + * Internal up-to-date world timezone information based on
  34 + Olson's database.
  35 +
  36 + * Computing of Easter Sunday dates for any given year,
  37 + using Western, Orthodox or Julian algorithms;
  38 +
  39 + * More than 400 test cases.
  40 +
  41 +== Quick example ==
  42 +Here's a snapshot, just to give an idea about the power of the
  43 +package. For more examples, look at the documentation below.
  44 +
  45 +Suppose you want to know how much time is left, in
  46 +years/months/days/etc, before the next easter happening on a
  47 +year with a Friday 13th in August, and you want to get today's
  48 +date out of the "date" unix system command. Here is the code:
  49 +{{{
  50 +from dateutil.relativedelta import *
  51 +from dateutil.easter import *
  52 +from dateutil.rrule import *
  53 +from dateutil.parser import *
  54 +from datetime import *
  55 +import commands
  56 +import os
  57 +now = parse(commands.getoutput("date"))
  58 +today = now.date()
  59 +year = rrule(YEARLY,bymonth=8,bymonthday=13,byweekday=FR)[0].year
  60 +rdelta = relativedelta(easter(year), today)
  61 +print "Today is:", today
  62 +print "Year with next Aug 13th on a Friday is:", year
  63 +print "How far is the Easter of that year:", rdelta
  64 +print "And the Easter of that year is:", today+rdelta
  65 +}}}
  66 +
  67 +And here's the output:
  68 +{{{
  69 +Today is: 2003-10-11
  70 +Year with next Aug 13th on a Friday is: 2004
  71 +How far is the Easter of that year: relativedelta(months=+6)
  72 +And the Easter of that year is: 2004-04-11
  73 +}}}
  74 +
  75 +{i} Being exactly 6 months ahead was '''really''' a coincidence :)
  76 +
  77 +== Download ==
  78 +The following files are available.
  79 + * attachment:python-dateutil-1.0.tar.bz2
  80 + * attachment:python-dateutil-1.0-1.noarch.rpm
  81 +
  82 +== Author ==
  83 +The dateutil module was written by GustavoNiemeyer <gustavo@niemeyer.net>.
  84 +
  85 +== Documentation ==
  86 +The following modules are available.
  87 +
  88 +=== relativedelta ===
  89 +This module offers the '''relativedelta''' type, which is based
  90 +on the specification of the excelent work done by M.-A. Lemburg in his
  91 +[http://www.egenix.com/files/python/mxDateTime.html mxDateTime]
  92 +extension. However, notice that this type '''does not''' implement the
  93 +same algorithm as his work. Do not expect it to behave like
  94 +{{{mxDateTime}}}'s counterpart.
  95 +
  96 +==== relativedelta type ====
  97 +
  98 +There's two different ways to build a relativedelta instance. The
  99 +first one is passing it two {{{date}}}/{{{datetime}}} instances:
  100 +{{{
  101 +relativedelta(datetime1, datetime2)
  102 +}}}
  103 +
  104 +This will build the relative difference between {{{datetime1}}} and
  105 +{{{datetime2}}}, so that the following constraint is always true:
  106 +{{{
  107 +datetime2+relativedelta(datetime1, datetime2) == datetime1
  108 +}}}
  109 +
  110 +Notice that instead of {{{datetime}}} instances, you may use
  111 +{{{date}}} instances, or a mix of both.
  112 +
  113 +And the other way is to use any of the following keyword arguments:
  114 +
  115 + year, month, day, hour, minute, second, microsecond::
  116 + Absolute information.
  117 +
  118 + years, months, weeks, days, hours, minutes, seconds, microseconds::
  119 + Relative information, may be negative.
  120 +
  121 + weekday::
  122 + One of the weekday instances ({{{MO}}}, {{{TU}}}, etc). These
  123 + instances may receive a parameter {{{n}}}, specifying the {{{n}}}th
  124 + weekday, which could be positive or negative (like {{{MO(+2)}}} or
  125 + {{{MO(-3)}}}. Not specifying it is the same as specifying {{{+1}}}.
  126 + You can also use an integer, where {{{0=MO}}}. Notice that,
  127 + for example, if the calculated date is already Monday, using
  128 + {{{MO}}} or {{{MO(+1)}}} (which is the same thing in this context),
  129 + won't change the day.
  130 +
  131 + leapdays::
  132 + Will add given days to the date found, but only if the computed
  133 + year is a leap year and the computed date is post 28 of february.
  134 +
  135 + yearday, nlyearday::
  136 + Set the yearday or the non-leap year day (jump leap days).
  137 + These are converted to {{{day}}}/{{{month}}}/{{{leapdays}}}
  138 + information.
  139 +
  140 +==== Behavior of operations ====
  141 +If you're curious about exactly how the relative delta will act
  142 +on operations, here is a description of its behavior.
  143 +
  144 + 1. Calculate the absolute year, using the {{{year}}} argument, or the
  145 + original datetime year, if the argument is not present.
  146 + 1. Add the relative {{{years}}} argument to the absolute year.
  147 + 1. Do steps 1 and 2 for {{{month}}}/{{{months}}}.
  148 + 1. Calculate the absolute day, using the {{{day}}} argument, or the
  149 + original datetime day, if the argument is not present. Then, subtract
  150 + from the day until it fits in the year and month found after their
  151 + operations.
  152 + 1. Add the relative {{{days}}} argument to the absolute day. Notice
  153 + that the {{{weeks}}} argument is multiplied by 7 and added to {{{days}}}.
  154 + 1. If {{{leapdays}}} is present, the computed year is a leap year, and
  155 + the computed month is after february, remove one day from the found date.
  156 + 1. Do steps 1 and 2 for {{{hour}}}/{{{hours}}}, {{{minute}}}/{{{minutes}}},
  157 + {{{second}}}/{{{seconds}}}, {{{microsecond}}}/{{{microseconds}}}.
  158 + 1. If the {{{weekday}}} argument is present, calculate the {{{n}}}th
  159 + occurrence of the given weekday.
  160 +
  161 +==== Examples ====
  162 +
  163 +Let's begin our trip.
  164 +{{{
  165 +>>> from datetime import *; from dateutil.relativedelta import *
  166 +>>> import calendar
  167 +}}}
  168 +
  169 +Store some values.
  170 +{{{
  171 +>>> NOW = datetime.now()
  172 +>>> TODAY = date.today()
  173 +>>> NOW
  174 +datetime.datetime(2003, 9, 17, 20, 54, 47, 282310)
  175 +>>> TODAY
  176 +datetime.date(2003, 9, 17)
  177 +}}}
  178 +
  179 +Next month.
  180 +{{{
  181 +>>> NOW+relativedelta(months=+1)
  182 +datetime.datetime(2003, 10, 17, 20, 54, 47, 282310)
  183 +}}}
  184 +
  185 +Next month, plus one week.
  186 +{{{
  187 +>>> NOW+relativedelta(months=+1, weeks=+1)
  188 +datetime.datetime(2003, 10, 24, 20, 54, 47, 282310)
  189 +}}}
  190 +
  191 +Next month, plus one week, at 10am.
  192 +{{{
  193 +>>> TODAY+relativedelta(months=+1, weeks=+1, hour=10)
  194 +datetime.datetime(2003, 10, 24, 10, 0)
  195 +}}}
  196 +
  197 +Let's try the other way around. Notice that the
  198 +hour setting we get in the relativedelta is relative,
  199 +since it's a difference, and the weeks parameter
  200 +has gone.
  201 +{{{
  202 +>>> relativedelta(datetime(2003, 10, 24, 10, 0), TODAY)
  203 +relativedelta(months=+1, days=+7, hours=+10)
  204 +}}}
  205 +
  206 +One month before one year.
  207 +{{{
  208 +>>> NOW+relativedelta(years=+1, months=-1)
  209 +datetime.datetime(2004, 8, 17, 20, 54, 47, 282310)
  210 +}}}
  211 +
  212 +How does it handle months with different numbers of days?
  213 +Notice that adding one month will never cross the month
  214 +boundary.
  215 +{{{
  216 +>>> date(2003,1,27)+relativedelta(months=+1)
  217 +datetime.date(2003, 2, 27)
  218 +>>> date(2003,1,31)+relativedelta(months=+1)
  219 +datetime.date(2003, 2, 28)
  220 +>>> date(2003,1,31)+relativedelta(months=+2)
  221 +datetime.date(2003, 3, 31)
  222 +}}}
  223 +
  224 +The logic for years is the same, even on leap years.
  225 +{{{
  226 +>>> date(2000,2,28)+relativedelta(years=+1)
  227 +datetime.date(2001, 2, 28)
  228 +>>> date(2000,2,29)+relativedelta(years=+1)
  229 +datetime.date(2001, 2, 28)
  230 +
  231 +>>> date(1999,2,28)+relativedelta(years=+1)
  232 +datetime.date(2000, 2, 28)
  233 +>>> date(1999,3,1)+relativedelta(years=+1)
  234 +datetime.date(2000, 3, 1)
  235 +
  236 +>>> date(2001,2,28)+relativedelta(years=-1)
  237 +datetime.date(2000, 2, 28)
  238 +>>> date(2001,3,1)+relativedelta(years=-1)
  239 +datetime.date(2000, 3, 1)
  240 +}}}
  241 +
  242 +Next friday.
  243 +{{{
  244 +>>> TODAY+relativedelta(weekday=FR)
  245 +datetime.date(2003, 9, 19)
  246 +
  247 +>>> TODAY+relativedelta(weekday=calendar.FRIDAY)
  248 +datetime.date(2003, 9, 19)
  249 +}}}
  250 +
  251 +Last friday in this month.
  252 +{{{
  253 +>>> TODAY+relativedelta(day=31, weekday=FR(-1))
  254 +datetime.date(2003, 9, 26)
  255 +}}}
  256 +
  257 +Next wednesday (it's today!).
  258 +{{{
  259 +>>> TODAY+relativedelta(weekday=WE(+1))
  260 +datetime.date(2003, 9, 17)
  261 +}}}
  262 +
  263 +Next wednesday, but not today.
  264 +{{{
  265 +>>> TODAY+relativedelta(days=+1, weekday=WE(+1))
  266 +datetime.date(2003, 9, 24)
  267 +}}}
  268 +
  269 +Following
  270 +[http://www.cl.cam.ac.uk/~mgk25/iso-time.html ISO year week number notation]
  271 +find the first day of the 15th week of 1997.
  272 +{{{
  273 +>>> datetime(1997,1,1)+relativedelta(day=4, weekday=MO(-1), weeks=+14)
  274 +datetime.datetime(1997, 4, 7, 0, 0)
  275 +}}}
  276 +
  277 +How long ago has the millennium changed?
  278 +{{{
  279 +>>> relativedelta(NOW, date(2001,1,1))
  280 +relativedelta(years=+2, months=+8, days=+16,
  281 + hours=+20, minutes=+54, seconds=+47, microseconds=+282310)
  282 +}}}
  283 +
  284 +How old is John?
  285 +{{{
  286 +>>> johnbirthday = datetime(1978, 4, 5, 12, 0)
  287 +>>> relativedelta(NOW, johnbirthday)
  288 +relativedelta(years=+25, months=+5, days=+12,
  289 + hours=+8, minutes=+54, seconds=+47, microseconds=+282310)
  290 +}}}
  291 +
  292 +It works with dates too.
  293 +{{{
  294 +>>> relativedelta(TODAY, johnbirthday)
  295 +relativedelta(years=+25, months=+5, days=+11, hours=+12)
  296 +}}}
  297 +
  298 +Obtain today's date using the yearday:
  299 +{{{
  300 +>>> date(2003, 1, 1)+relativedelta(yearday=260)
  301 +datetime.date(2003, 9, 17)
  302 +}}}
  303 +
  304 +We can use today's date, since yearday should be absolute
  305 +in the given year:
  306 +{{{
  307 +>>> TODAY+relativedelta(yearday=260)
  308 +datetime.date(2003, 9, 17)
  309 +}}}
  310 +
  311 +Last year it should be in the same day:
  312 +{{{
  313 +>>> date(2002, 1, 1)+relativedelta(yearday=260)
  314 +datetime.date(2002, 9, 17)
  315 +}}}
  316 +
  317 +But not in a leap year:
  318 +{{{
  319 +>>> date(2000, 1, 1)+relativedelta(yearday=260)
  320 +datetime.date(2000, 9, 16)
  321 +}}}
  322 +
  323 +We can use the non-leap year day to ignore this:
  324 +{{{
  325 +>>> date(2000, 1, 1)+relativedelta(nlyearday=260)
  326 +datetime.date(2000, 9, 17)
  327 +}}}
  328 +
  329 +=== rrule ===
  330 +The rrule module offers a small, complete, and very fast, implementation
  331 +of the recurrence rules documented in the
  332 +[ftp://ftp.rfc-editor.org/in-notes/rfc2445.txt iCalendar RFC], including
  333 +support for caching of results.
  334 +
  335 +==== rrule type ====
  336 +That's the base of the rrule operation. It accepts all the keywords
  337 +defined in the RFC as its constructor parameters (except {{{byday}}},
  338 +which was renamed to {{{byweekday}}}) and more. The constructor
  339 +prototype is:
  340 +{{{
  341 +rrule(freq)
  342 +}}}
  343 +
  344 +Where {{{freq}}} must be one of {{{YEARLY}}}, {{{MONTHLY}}},
  345 +{{{WEEKLY}}}, {{{DAILY}}}, {{{HOURLY}}}, {{{MINUTELY}}},
  346 +or {{{SECONDLY}}}.
  347 +
  348 +Additionally, it supports the following keyword arguments:
  349 +
  350 + cache::
  351 + If given, it must be a boolean value specifying to enable
  352 + or disable caching of results. If you will use the same
  353 + {{{rrule}}} instance multiple times, enabling caching will
  354 + improve the performance considerably.
  355 +
  356 + dtstart::
  357 + The recurrence start. Besides being the base for the
  358 + recurrence, missing parameters in the final recurrence
  359 + instances will also be extracted from this date. If not
  360 + given, {{{datetime.now()}}} will be used instead.
  361 +
  362 + interval::
  363 + The interval between each {{{freq}}} iteration. For example,
  364 + when using {{{YEARLY}}}, an interval of {{{2}}} means
  365 + once every two years, but with {{{HOURLY}}}, it means
  366 + once every two hours. The default interval is {{{1}}}.
  367 +
  368 + wkst::
  369 + The week start day. Must be one of the {{{MO}}}, {{{TU}}},
  370 + {{{WE}}} constants, or an integer, specifying the first day
  371 + of the week. This will affect recurrences based on weekly
  372 + periods. The default week start is got from
  373 + {{{calendar.firstweekday()}}}, and may be modified by
  374 + {{{calendar.setfirstweekday()}}}.
  375 +
  376 + count::
  377 + How many occurrences will be generated.
  378 +
  379 + until::
  380 + If given, this must be a {{{datetime}}} instance, that will
  381 + specify the limit of the recurrence. If a recurrence instance
  382 + happens to be the same as the {{{datetime}}} instance given
  383 + in the {{{until}}} keyword, this will be the last occurrence.
  384 +
  385 + bysetpos::
  386 + If given, it must be either an integer, or a sequence of
  387 + integers, positive or negative. Each given integer will
  388 + specify an occurrence number, corresponding to the nth
  389 + occurrence of the rule inside the frequency period. For
  390 + example, a {{{bysetpos}}} of {{{-1}}} if combined with a
  391 + {{{MONTHLY}}} frequency, and a {{{byweekday}}} of
  392 + {{{(MO, TU, WE, TH, FR)}}}, will result in the last work
  393 + day of every month.
  394 +
  395 + bymonth::
  396 + If given, it must be either an integer, or a sequence of
  397 + integers, meaning the months to apply the recurrence to.
  398 +
  399 + bymonthday::
  400 + If given, it must be either an integer, or a sequence of
  401 + integers, meaning the month days to apply the recurrence to.
  402 +
  403 + byyearday::
  404 + If given, it must be either an integer, or a sequence of
  405 + integers, meaning the year days to apply the recurrence to.
  406 +
  407 + byweekno::
  408 + If given, it must be either an integer, or a sequence of
  409 + integers, meaning the week numbers to apply the recurrence
  410 + to. Week numbers have the meaning described in ISO8601,
  411 + that is, the first week of the year is that containing at
  412 + least four days of the new year.
  413 +
  414 + byweekday::
  415 + If given, it must be either an integer ({{{0 == MO}}}), a
  416 + sequence of integers, one of the weekday constants
  417 + ({{{MO}}}, {{{TU}}}, etc), or a sequence of these constants.
  418 + When given, these variables will define the weekdays where
  419 + the recurrence will be applied. It's also possible to use
  420 + an argument {{{n}}} for the weekday instances, which will
  421 + mean the {{{n}}}''th'' occurrence of this weekday in the
  422 + period. For example, with {{{MONTHLY}}}, or with
  423 + {{{YEARLY}}} and {{{BYMONTH}}}, using {{{FR(+1)}}}
  424 + in {{{byweekday}}} will specify the first friday of the
  425 + month where the recurrence happens. Notice that in the RFC
  426 + documentation, this is specified as {{{BYDAY}}}, but was
  427 + renamed to avoid the ambiguity of that keyword.
  428 +
  429 + byhour::
  430 + If given, it must be either an integer, or a sequence of
  431 + integers, meaning the hours to apply the recurrence to.
  432 +
  433 + byminute::
  434 + If given, it must be either an integer, or a sequence of
  435 + integers, meaning the minutes to apply the recurrence to.
  436 +
  437 + bysecond::
  438 + If given, it must be either an integer, or a sequence of
  439 + integers, meaning the seconds to apply the recurrence to.
  440 +
  441 + byeaster::
  442 + If given, it must be either an integer, or a sequence of
  443 + integers, positive or negative. Each integer will define
  444 + an offset from the Easter Sunday. Passing the offset
  445 + {{{0}}} to {{{byeaster}}} will yield the Easter Sunday
  446 + itself. This is an extension to the RFC specification.
  447 +
  448 +==== rrule methods ====
  449 +The following methods are available in {{{rrule}}} instances:
  450 +
  451 + rrule.before(dt, inc=False)::
  452 + Returns the last recurrence before the given {{{datetime}}}
  453 + instance. The {{{inc}}} keyword defines what happens if
  454 + {{{dt}}} '''is''' an occurrence. With {{{inc == True}}},
  455 + if {{{dt}}} itself is an occurrence, it will be returned.
  456 +
  457 + rrule.after(dt, inc=False)::
  458 + Returns the first recurrence after the given {{{datetime}}}
  459 + instance. The {{{inc}}} keyword defines what happens if
  460 + {{{dt}}} '''is''' an occurrence. With {{{inc == True}}},
  461 + if {{{dt}}} itself is an occurrence, it will be returned.
  462 +
  463 + rrule.between(after, before, inc=False)::
  464 + Returns all the occurrences of the rrule between {{{after}}}
  465 + and {{{before}}}. The {{{inc}}} keyword defines what happens
  466 + if {{{after}}} and/or {{{before}}} are themselves occurrences.
  467 + With {{{inc == True}}}, they will be included in the list,
  468 + if they are found in the recurrence set.
  469 +
  470 + rrule.count()::
  471 + Returns the number of recurrences in this set. It will have
  472 + go trough the whole recurrence, if this hasn't been done
  473 + before.
  474 +
  475 +Besides these methods, {{{rrule}}} instances also support
  476 +the {{{__getitem__()}}} and {{{__contains__()}}} special methods,
  477 +meaning that these are valid expressions:
  478 +{{{
  479 +rr = rrule(...)
  480 +if datetime(...) in rr:
  481 + ...
  482 +print rr[0]
  483 +print rr[-1]
  484 +print rr[1:2]
  485 +print rr[::-2]
  486 +}}}
  487 +
  488 +The getitem/slicing mechanism is smart enough to avoid getting the whole
  489 +recurrence set, if possible.
  490 +
  491 +==== Notes ====
  492 +
  493 + * The rrule type has no {{{byday}}} keyword. The equivalent keyword
  494 + has been replaced by the {{{byweekday}}} keyword, to remove the
  495 + ambiguity present in the original keyword.
  496 +
  497 + * Unlike documented in the RFC, the starting datetime ({{{dtstart}}})
  498 + is not the first recurrence instance, unless it does fit in the
  499 + specified rules. In a python module context, this behavior makes more
  500 + sense than otherwise. Notice that you can easily get the original
  501 + behavior by using a rruleset and adding the {{{dtstart}}} as an
  502 + {{{rdate}}} recurrence.
  503 +
  504 + * Unlike documented in the RFC, every keyword is valid on every
  505 + frequency (the RFC documents that {{{byweekno}}} is only valid
  506 + on yearly frequencies, for example).
  507 +
  508 + * In addition to the documented keywords, a {{{byeaster}}} keyword
  509 + was introduced, making it easy to compute recurrent events relative
  510 + to the Easter Sunday.
  511 +
  512 +==== rrule examples ====
  513 +These examples were converted from the RFC.
  514 +
  515 +Prepare the environment.
  516 +{{{
  517 +>>> from dateutil.rrule import *
  518 +>>> from dateutil.parser import *
  519 +>>> from datetime import *
  520 +
  521 +>>> import pprint
  522 +>>> import sys
  523 +>>> sys.displayhook = pprint.pprint
  524 +}}}
  525 +
  526 +Daily, for 10 occurrences.
  527 +{{{
  528 +>>> list(rrule(DAILY, count=10,
  529 + dtstart=parse("19970902T090000")))
  530 +[datetime.datetime(1997, 9, 2, 9, 0),
  531 + datetime.datetime(1997, 9, 3, 9, 0),
  532 + datetime.datetime(1997, 9, 4, 9, 0),
  533 + datetime.datetime(1997, 9, 5, 9, 0),
  534 + datetime.datetime(1997, 9, 6, 9, 0),
  535 + datetime.datetime(1997, 9, 7, 9, 0),
  536 + datetime.datetime(1997, 9, 8, 9, 0),
  537 + datetime.datetime(1997, 9, 9, 9, 0),
  538 + datetime.datetime(1997, 9, 10, 9, 0),
  539 + datetime.datetime(1997, 9, 11, 9, 0)]
  540 +}}}
  541 +
  542 +Daily until December 24, 1997
  543 +{{{
  544 +>>> list(rrule(DAILY,
  545 + dtstart=parse("19970902T090000"),
  546 + until=parse("19971224T000000")))
  547 +[datetime.datetime(1997, 9, 2, 9, 0),
  548 + datetime.datetime(1997, 9, 3, 9, 0),
  549 + datetime.datetime(1997, 9, 4, 9, 0),
  550 + (...)
  551 + datetime.datetime(1997, 12, 21, 9, 0),
  552 + datetime.datetime(1997, 12, 22, 9, 0),
  553 + datetime.datetime(1997, 12, 23, 9, 0)]
  554 +}}}
  555 +
  556 +Every other day, 5 occurrences.
  557 +{{{
  558 +>>> list(rrule(DAILY, interval=2, count=5,
  559 + dtstart=parse("19970902T090000")))
  560 +[datetime.datetime(1997, 9, 2, 9, 0),
  561 + datetime.datetime(1997, 9, 4, 9, 0),
  562 + datetime.datetime(1997, 9, 6, 9, 0),
  563 + datetime.datetime(1997, 9, 8, 9, 0),
  564 + datetime.datetime(1997, 9, 10, 9, 0)]
  565 +}}}
  566 +
  567 +Every 10 days, 5 occurrences.
  568 +{{{
  569 +>>> list(rrule(DAILY, interval=10, count=5,
  570 + dtstart=parse("19970902T090000")))
  571 +[datetime.datetime(1997, 9, 2, 9, 0),
  572 + datetime.datetime(1997, 9, 12, 9, 0),
  573 + datetime.datetime(1997, 9, 22, 9, 0),
  574 + datetime.datetime(1997, 10, 2, 9, 0),
  575 + datetime.datetime(1997, 10, 12, 9, 0)]
  576 +}}}
  577 +
  578 +Everyday in January, for 3 years.
  579 +{{{
  580 +>>> list(rrule(YEARLY, bymonth=1, byweekday=range(7),
  581 + dtstart=parse("19980101T090000"),
  582 + until=parse("20000131T090000")))
  583 +[datetime.datetime(1998, 1, 1, 9, 0),
  584 + datetime.datetime(1998, 1, 2, 9, 0),
  585 + (...)
  586 + datetime.datetime(1998, 1, 30, 9, 0),
  587 + datetime.datetime(1998, 1, 31, 9, 0),
  588 + datetime.datetime(1999, 1, 1, 9, 0),
  589 + datetime.datetime(1999, 1, 2, 9, 0),
  590 + (...)
  591 + datetime.datetime(1999, 1, 30, 9, 0),
  592 + datetime.datetime(1999, 1, 31, 9, 0),
  593 + datetime.datetime(2000, 1, 1, 9, 0),
  594 + datetime.datetime(2000, 1, 2, 9, 0),
  595 + (...)
  596 + datetime.datetime(2000, 1, 29, 9, 0),
  597 + datetime.datetime(2000, 1, 31, 9, 0)]
  598 +}}}
  599 +
  600 +Same thing, in another way.
  601 +{{{
  602 +>>> list(rrule(DAILY, bymonth=1,
  603 + dtstart=parse("19980101T090000"),
  604 + until=parse("20000131T090000")))
  605 +(...)
  606 +}}}
  607 +
  608 +Weekly for 10 occurrences.
  609 +{{{
  610 +>>> list(rrule(WEEKLY, count=10,
  611 + dtstart=parse("19970902T090000")))
  612 +[datetime.datetime(1997, 9, 2, 9, 0),
  613 + datetime.datetime(1997, 9, 9, 9, 0),
  614 + datetime.datetime(1997, 9, 16, 9, 0),
  615 + datetime.datetime(1997, 9, 23, 9, 0),
  616 + datetime.datetime(1997, 9, 30, 9, 0),
  617 + datetime.datetime(1997, 10, 7, 9, 0),
  618 + datetime.datetime(1997, 10, 14, 9, 0),
  619 + datetime.datetime(1997, 10, 21, 9, 0),
  620 + datetime.datetime(1997, 10, 28, 9, 0),
  621 + datetime.datetime(1997, 11, 4, 9, 0)]
  622 +}}}
  623 +
  624 +Every other week, 6 occurrences.
  625 +{{{
  626 +>>> list(rrule(WEEKLY, interval=2, count=6,
  627 + dtstart=parse("19970902T090000")))
  628 +[datetime.datetime(1997, 9, 2, 9, 0),
  629 + datetime.datetime(1997, 9, 16, 9, 0),
  630 + datetime.datetime(1997, 9, 30, 9, 0),
  631 + datetime.datetime(1997, 10, 14, 9, 0),
  632 + datetime.datetime(1997, 10, 28, 9, 0),
  633 + datetime.datetime(1997, 11, 11, 9, 0)]
  634 +}}}
  635 +
  636 +Weekly on Tuesday and Thursday for 5 weeks.
  637 +{{{
  638 +>>> list(rrule(WEEKLY, count=10, wkst=SU, byweekday=(TU,TH),
  639 + dtstart=parse("19970902T090000")))
  640 +[datetime.datetime(1997, 9, 2, 9, 0),
  641 + datetime.datetime(1997, 9, 4, 9, 0),
  642 + datetime.datetime(1997, 9, 9, 9, 0),
  643 + datetime.datetime(1997, 9, 11, 9, 0),
  644 + datetime.datetime(1997, 9, 16, 9, 0),
  645 + datetime.datetime(1997, 9, 18, 9, 0),
  646 + datetime.datetime(1997, 9, 23, 9, 0),
  647 + datetime.datetime(1997, 9, 25, 9, 0),
  648 + datetime.datetime(1997, 9, 30, 9, 0),
  649 + datetime.datetime(1997, 10, 2, 9, 0)]
  650 +}}}
  651 +
  652 +Every other week on Tuesday and Thursday, for 8 occurrences.
  653 +{{{
  654 +>>> list(rrule(WEEKLY, interval=2, count=8,
  655 + wkst=SU, byweekday=(TU,TH),
  656 + dtstart=parse("19970902T090000")))
  657 +[datetime.datetime(1997, 9, 2, 9, 0),
  658 + datetime.datetime(1997, 9, 4, 9, 0),
  659 + datetime.datetime(1997, 9, 16, 9, 0),
  660 + datetime.datetime(1997, 9, 18, 9, 0),
  661 + datetime.datetime(1997, 9, 30, 9, 0),
  662 + datetime.datetime(1997, 10, 2, 9, 0),
  663 + datetime.datetime(1997, 10, 14, 9, 0),
  664 + datetime.datetime(1997, 10, 16, 9, 0)]
  665 +}}}
  666 +
  667 +Monthly on the 1st Friday for ten occurrences.
  668 +{{{
  669 +>>> list(rrule(MONTHLY, count=10, byweekday=FR(1),
  670 + dtstart=parse("19970905T090000")))
  671 +[datetime.datetime(1997, 9, 5, 9, 0),
  672 + datetime.datetime(1997, 10, 3, 9, 0),
  673 + datetime.datetime(1997, 11, 7, 9, 0),
  674 + datetime.datetime(1997, 12, 5, 9, 0),
  675 + datetime.datetime(1998, 1, 2, 9, 0),
  676 + datetime.datetime(1998, 2, 6, 9, 0),
  677 + datetime.datetime(1998, 3, 6, 9, 0),
  678 + datetime.datetime(1998, 4, 3, 9, 0),
  679 + datetime.datetime(1998, 5, 1, 9, 0),
  680 + datetime.datetime(1998, 6, 5, 9, 0)]
  681 +}}}
  682 +
  683 +Every other month on the 1st and last Sunday of the month for 10 occurrences.
  684 +{{{
  685 +>>> list(rrule(MONTHLY, interval=2, count=10,
  686 + byweekday=(SU(1), SU(-1)),
  687 + dtstart=parse("19970907T090000")))
  688 +[datetime.datetime(1997, 9, 7, 9, 0),
  689 + datetime.datetime(1997, 9, 28, 9, 0),