param: Remove "use ntdb"
[Samba.git] / third_party / pyiso8601 / docs / index.rst
blobe28f2dc08fc84a26f7b326528e026ecd5f404b89
1 pyiso8601: ISO 8601 Parsing for Python
2 ======================================
4 .. image:: https://pypip.in/d/iso8601/badge.png
6 This module parses the most common forms of ISO 8601 date strings (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
8 >>> import iso8601
9 >>> iso8601.parse_date("2007-01-25T12:00:00Z")
10 datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
11 >>>
13 This module is released under a MIT license.
15 If you want more full featured parsing look at:
17 - http://labix.org/python-dateutil - python-dateutil
19 Parsed Formats
20 ==============
22 You can parse full date + times, or just the date. In both cases a datetime instance is returned but with missing times defaulting to 0, and missing days / months defaulting to 1.
24 Dates
25 -----
27 - YYYY-MM-DD
28 - YYYYMMDD
29 - YYYY-MM (defaults to 1 for the day)
30 - YYYY (defaults to 1 for month and day)
32 Times
33 -----
35 - hh:mm:ss.nn
36 - hhmmss.nn
37 - hh:mm (defaults to 0 for seconds)
38 - hhmm (defaults to 0 for seconds)
39 - hh (defaults to 0 for minutes and seconds)
41 Time Zones
42 ----------
44 - Nothing uses the default timezone given (UTC).
45 - Z (UTC)
46 - +/-hh:mm
47 - +/-hhmm
48 - +/-hh
50 Where it Differs From ISO 8601
51 ==============================
53 Known differences from the ISO 8601 spec:
55 - You can use a " " (space) instead of T for separating date from time.
56 - Days and months without a leading 0 (2 vs 02) will be parsed.
57 - If time zone information is omitted the default time zone given is used (which in turn defaults to UTC). Use a default of None to yield naive datetime instances.
59 Installation
60 ============
62 To install simply use pip::
64     pip install iso8601
67 API
68 ===
70 .. autofunction:: iso8601.parse_date
72 .. autoexception:: iso8601.ParseError
74 Authors
75 =======
77 Currently active committers:
79 - Michael Twomey
80 - Julien Danjou