• Home
  • History
  • Annotate
Name
Date
Size
#Lines
LOC

..--

changelog.d/23-Nov-2023-3424

ci_tools/23-Nov-2023-3021

dateutil/23-Nov-2023-17,59413,527

docs/23-Nov-2023-3,1472,134

.gitD01-Jan-19700

.gitattributesD23-Nov-2023320 1816

.gitignoreD23-Nov-2023299 2719

.travis.ymlD23-Nov-2023477 3428

AUTHORS.mdD23-Nov-20234 KiB8681

CONTRIBUTING.mdD23-Nov-20236.2 KiB10162

LICENSED23-Nov-20232.8 KiB5444

MANIFEST.inD23-Nov-2023144 54

METADATAD23-Nov-2023399 1816

MODULE_LICENSE_APACHE2D23-Nov-20230

NEWSD23-Nov-202330.3 KiB649545

NOTICED23-Nov-20232.8 KiB5444

OWNERSD23-Nov-2023210 54

README.rstD23-Nov-20235.5 KiB143109

RELEASINGD23-Nov-20233.5 KiB9670

appveyor.ymlD23-Nov-20231.2 KiB4634

codecov.ymlD23-Nov-2023120 98

pyproject.tomlD23-Nov-2023939 4032

release.pyD23-Nov-20232.1 KiB8061

requirements-dev.txtD23-Nov-2023151 87

setup.cfgD23-Nov-202397 86

setup.pyD23-Nov-20232.8 KiB8972

tox.iniD23-Nov-20231.8 KiB6052

updatezinfo.pyD23-Nov-20231.6 KiB5640

zonefile_metadata.jsonD23-Nov-2023671 2525

README.rst

1 dateutil - powerful extensions to datetime
2 ==========================================
3 
4 .. image:: https://img.shields.io/pypi/v/python-dateutil.svg?style=flat-square
5     :target: https://pypi.org/project/python-dateutil/
6     :alt: pypi version
7 
8 .. image:: https://img.shields.io/travis/dateutil/dateutil/master.svg?style=flat-square
9     :target: https://travis-ci.org/dateutil/dateutil
10     :alt: travis build status
11 
12 .. image:: https://img.shields.io/appveyor/ci/dateutil/dateutil/master.svg?style=flat-square
13     :target: https://ci.appveyor.com/project/dateutil/dateutil
14     :alt: appveyor build status
15 
16 .. image:: https://codecov.io/github/dateutil/dateutil/coverage.svg?branch=master
17     :target: https://codecov.io/github/dateutil/dateutil?branch=master
18     :alt: Code coverage
19 
20 .. image:: https://badges.gitter.im/dateutil/dateutil.svg
21    :alt: Join the chat at https://gitter.im/dateutil/dateutil
22    :target: https://gitter.im/dateutil/dateutil
23 
24 
25 The `dateutil` module provides powerful extensions to
26 the standard `datetime` module, available in Python.
27 
28 
29 Download
30 ========
31 dateutil is available on PyPI
32 https://pypi.org/project/python-dateutil/
33 
34 The documentation is hosted at:
35 https://dateutil.readthedocs.io/en/stable/
36 
37 Code
38 ====
39 The code and issue tracker are hosted on Github:
40 https://github.com/dateutil/dateutil/
41 
42 Features
43 ========
44 
45 * Computing of relative deltas (next month, next year,
46   next monday, last week of month, etc);
47 * Computing of relative deltas between two given
48   date and/or datetime objects;
49 * Computing of dates based on very flexible recurrence rules,
50   using a superset of the `iCalendar <https://www.ietf.org/rfc/rfc2445.txt>`_
51   specification. Parsing of RFC strings is supported as well.
52 * Generic parsing of dates in almost any string format;
53 * Timezone (tzinfo) implementations for tzfile(5) format
54   files (/etc/localtime, /usr/share/zoneinfo, etc), TZ
55   environment string (in all known formats), iCalendar
56   format files, given ranges (with help from relative deltas),
57   local machine timezone, fixed offset timezone, UTC timezone,
58   and Windows registry-based time zones.
59 * Internal up-to-date world timezone information based on
60   Olson's database.
61 * Computing of Easter Sunday dates for any given year,
62   using Western, Orthodox or Julian algorithms;
63 * A comprehensive test suite.
64 
65 Quick example
66 =============
67 Here's a snapshot, just to give an idea about the power of the
68 package. For more examples, look at the documentation.
69 
70 Suppose you want to know how much time is left, in
71 years/months/days/etc, before the next easter happening on a
72 year with a Friday 13th in August, and you want to get today's
73 date out of the "date" unix system command. Here is the code:
74 
75 .. doctest:: readmeexample
76 
77     >>> from dateutil.relativedelta import *
78     >>> from dateutil.easter import *
79     >>> from dateutil.rrule import *
80     >>> from dateutil.parser import *
81     >>> from datetime import *
82     >>> now = parse("Sat Oct 11 17:13:46 UTC 2003")
83     >>> today = now.date()
84     >>> year = rrule(YEARLY,dtstart=now,bymonth=8,bymonthday=13,byweekday=FR)[0].year
85     >>> rdelta = relativedelta(easter(year), today)
86     >>> print("Today is: %s" % today)
87     Today is: 2003-10-11
88     >>> print("Year with next Aug 13th on a Friday is: %s" % year)
89     Year with next Aug 13th on a Friday is: 2004
90     >>> print("How far is the Easter of that year: %s" % rdelta)
91     How far is the Easter of that year: relativedelta(months=+6)
92     >>> print("And the Easter of that year is: %s" % (today+rdelta))
93     And the Easter of that year is: 2004-04-11
94 
95 Being exactly 6 months ahead was **really** a coincidence :)
96 
97 Contributing
98 ============
99 
100 We welcome many types of contributions - bug reports, pull requests (code, infrastructure or documentation fixes). For more information about how to contribute to the project, see the ``CONTRIBUTING.md`` file in the repository.
101 
102 
103 Author
104 ======
105 The dateutil module was written by Gustavo Niemeyer <gustavo@niemeyer.net>
106 in 2003.
107 
108 It is maintained by:
109 
110 * Gustavo Niemeyer <gustavo@niemeyer.net> 2003-2011
111 * Tomi Pieviläinen <tomi.pievilainen@iki.fi> 2012-2014
112 * Yaron de Leeuw <me@jarondl.net> 2014-2016
113 * Paul Ganssle <paul@ganssle.io> 2015-
114 
115 Starting with version 2.4.1, all source and binary distributions will be signed
116 by a PGP key that has, at the very least, been signed by the key which made the
117 previous release. A table of release signing keys can be found below:
118 
119 Starting with version 2.4.1, all source and binary distributions will be signed
120 by a PGP key that has, at the very least, been signed by the key which made the
121 previous release. A table of release signing keys can be found below:
122 
123 ===========  ============================
124 Releases     Signing key fingerprint
125 ===========  ============================
126 2.4.1-       `6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB`_
127 ===========  ============================
128 
129 
130 Contact
131 =======
132 Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of
133 conduct <https://www.python.org/psf/codeofconduct/>`_.
134 
135 License
136 =======
137 
138 All contributions after December 1, 2017 released under dual license - either `Apache 2.0 License <https://www.apache.org/licenses/LICENSE-2.0>`_ or the `BSD 3-Clause License <https://opensource.org/licenses/BSD-3-Clause>`_. Contributions before December 1, 2017 - except those those explicitly relicensed - are released only under the BSD 3-Clause License.
139 
140 
141 .. _6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB:
142    https://pgp.mit.edu/pks/lookup?op=vindex&search=0xCD54FCE3D964BEFB
143