Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/isodate-0.6.0.dist-info/DESCRIPTION.rst @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
comparison
equal
deleted
inserted
replaced
4:79f47841a781 | 5:9b1c78e6ba9c |
---|---|
1 | |
2 ISO 8601 date/time parser | |
3 ========================= | |
4 | |
5 .. image:: https://travis-ci.org/gweis/isodate.svg?branch=master | |
6 :target: https://travis-ci.org/gweis/isodate | |
7 :alt: Travis-CI | |
8 .. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master | |
9 :target: https://coveralls.io/r/gweis/isodate?branch=master | |
10 :alt: Coveralls | |
11 .. image:: https://img.shields.io/pypi/v/isodate.svg | |
12 :target: https://pypi.python.org/pypi/isodate/ | |
13 :alt: Latest Version | |
14 .. image:: https://img.shields.io/pypi/l/isodate.svg | |
15 :target: https://pypi.python.org/pypi/isodate/ | |
16 :alt: License | |
17 | |
18 | |
19 This module implements ISO 8601 date, time and duration parsing. | |
20 The implementation follows ISO8601:2004 standard, and implements only | |
21 date/time representations mentioned in the standard. If something is not | |
22 mentioned there, then it is treated as non existent, and not as an allowed | |
23 option. | |
24 | |
25 For instance, ISO8601:2004 never mentions 2 digit years. So, it is not | |
26 intended by this module to support 2 digit years. (while it may still | |
27 be valid as ISO date, because it is not explicitly forbidden.) | |
28 Another example is, when no time zone information is given for a time, | |
29 then it should be interpreted as local time, and not UTC. | |
30 | |
31 As this module maps ISO 8601 dates/times to standard Python data types, like | |
32 *date*, *time*, *datetime* and *timedelta*, it is not possible to convert | |
33 all possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are | |
34 not allowed by the Python *date* and *datetime* classes. Additionally | |
35 fractional seconds are limited to microseconds. That means if the parser finds | |
36 for instance nanoseconds it will round it to microseconds. | |
37 | |
38 Documentation | |
39 ------------- | |
40 | |
41 Currently there are four parsing methods available. | |
42 * parse_time: | |
43 parses an ISO 8601 time string into a *time* object | |
44 * parse_date: | |
45 parses an ISO 8601 date string into a *date* object | |
46 * parse_datetime: | |
47 parses an ISO 8601 date-time string into a *datetime* object | |
48 * parse_duration: | |
49 parses an ISO 8601 duration string into a *timedelta* or *Duration* | |
50 object. | |
51 * parse_tzinfo: | |
52 parses the time zone info part of an ISO 8601 string into a | |
53 *tzinfo* object. | |
54 | |
55 As ISO 8601 allows to define durations in years and months, and *timedelta* | |
56 does not handle years and months, this module provides a *Duration* class, | |
57 which can be used almost like a *timedelta* object (with some limitations). | |
58 However, a *Duration* object can be converted into a *timedelta* object. | |
59 | |
60 There are also ISO formatting methods for all supported data types. Each | |
61 *xxx_isoformat* method accepts a format parameter. The default format is | |
62 always the ISO 8601 expanded format. This is the same format used by | |
63 *datetime.isoformat*: | |
64 | |
65 * time_isoformat: | |
66 Intended to create ISO time strings with default format | |
67 *hh:mm:ssZ*. | |
68 * date_isoformat: | |
69 Intended to create ISO date strings with default format | |
70 *yyyy-mm-dd*. | |
71 * datetime_isoformat: | |
72 Intended to create ISO date-time strings with default format | |
73 *yyyy-mm-ddThh:mm:ssZ*. | |
74 * duration_isoformat: | |
75 Intended to create ISO duration strings with default format | |
76 *PnnYnnMnnDTnnHnnMnnS*. | |
77 * tz_isoformat: | |
78 Intended to create ISO time zone strings with default format | |
79 *hh:mm*. | |
80 * strftime: | |
81 A re-implementation mostly compatible with Python's *strftime*, but | |
82 supports only those format strings, which can also be used for dates | |
83 prior 1900. This method also understands how to format *datetime* and | |
84 *Duration* instances. | |
85 | |
86 Installation: | |
87 ------------- | |
88 | |
89 This module can easily be installed with Python standard installation methods. | |
90 | |
91 Either use *python setup.py install* or in case you have *setuptools* or | |
92 *distribute* available, you can also use *easy_install*. | |
93 | |
94 Limitations: | |
95 ------------ | |
96 | |
97 * The parser accepts several date/time representation which should be invalid | |
98 according to ISO 8601 standard. | |
99 | |
100 1. for date and time together, this parser accepts a mixture of basic and extended format. | |
101 e.g. the date could be in basic format, while the time is accepted in extended format. | |
102 It also allows short dates and times in date-time strings. | |
103 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of | |
104 1901-01-01. | |
105 3. negative *Duration* and *timedelta* value are not fully supported yet. | |
106 | |
107 Further information: | |
108 -------------------- | |
109 | |
110 The doc strings and unit tests should provide rather detailed information about | |
111 the methods and their limitations. | |
112 | |
113 The source release provides a *setup.py* script, | |
114 which can be used to run the unit tests included. | |
115 | |
116 Source code is available at `<http://github.com/gweis/isodate>`_. | |
117 | |
118 CHANGES | |
119 ======= | |
120 | |
121 0.6.0 (2017-10-13) | |
122 ------------------ | |
123 | |
124 - support incomplete month date (Fabien Loffredo) | |
125 - rely on duck typing when doing duration maths | |
126 - support ':' as separator in fractional time zones (usrenmae) | |
127 | |
128 | |
129 0.5.4 (2015-08-06) | |
130 ------------------ | |
131 | |
132 - Fix parsing of Periods (Fabien Bochu) | |
133 - Make Duration objects hashable (Geoffrey Fairchild) | |
134 - Add multiplication to duration (Reinoud Elhorst) | |
135 | |
136 | |
137 0.5.1 (2014-11-07) | |
138 ------------------ | |
139 | |
140 - fixed pickling of Duration objects | |
141 - raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney) | |
142 | |
143 | |
144 0.5.0 (2014-02-23) | |
145 ------------------ | |
146 | |
147 - ISO8601Error are subclasses of ValueError now (Michael Hrivnak) | |
148 - improve compatibility across various python variants and versions | |
149 - raise exceptions when using fractional years and months in date | |
150 maths with durations | |
151 - renamed method todatetime on Duraction objects to totimedelta | |
152 | |
153 | |
154 0.4.9 (2012-10-30) | |
155 ------------------ | |
156 | |
157 - support pickling FixedOffset instances | |
158 - make sure parsed fractional seconds are in microseconds | |
159 - add leading zeros when formattig microseconds (Jarom Loveridge) | |
160 | |
161 | |
162 0.4.8 (2012-05-04) | |
163 ------------------ | |
164 | |
165 - fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7 | |
166 and 3.2) | |
167 | |
168 | |
169 0.4.7 (2012-01-26) | |
170 ------------------ | |
171 | |
172 - fixed tzinfo formatting (never pass None into tzinfo.utcoffset()) | |
173 | |
174 | |
175 0.4.6 (2012-01-06) | |
176 ------------------ | |
177 | |
178 - added Python 3 compatibility via 2to3 | |
179 | |
180 0.4.5 (2012-01-06) | |
181 ------------------ | |
182 | |
183 - made setuptools dependency optional | |
184 | |
185 0.4.4 (2011-04-16) | |
186 ------------------ | |
187 | |
188 - Fixed formatting of microseconds for datetime objects | |
189 | |
190 0.4.3 (2010-10-29) | |
191 ------------------ | |
192 | |
193 - Fixed problem with %P formating and fractions (supplied by David Brooks) | |
194 | |
195 0.4.2 (2010-10-28) | |
196 ------------------ | |
197 | |
198 - Implemented unary - for Duration (supplied by David Brooks) | |
199 - Output fractional seconds with '%P' format. (partly supplied by David Brooks) | |
200 | |
201 0.4.1 (2010-10-13) | |
202 ------------------ | |
203 | |
204 - fixed bug in comparison between timedelta and Duration. | |
205 - fixed precision problem with microseconds (reported by Tommi Virtanen) | |
206 | |
207 0.4.0 (2009-02-09) | |
208 ------------------ | |
209 | |
210 - added method to parse ISO 8601 time zone strings | |
211 - added methods to create ISO 8601 conforming strings | |
212 | |
213 0.3.0 (2009-1-05) | |
214 ------------------ | |
215 | |
216 - Initial release | |
217 | |
218 TODOs | |
219 ===== | |
220 | |
221 This to do list contains some thoughts and ideas about missing features, and | |
222 parts to think about, whether to implement them or not. This list is probably | |
223 not complete. | |
224 | |
225 Missing features: | |
226 ----------------- | |
227 | |
228 * time formating does not allow to create fractional representations. | |
229 * parser for ISO intervals. | |
230 * currently microseconds are always padded to a length of 6 characters. | |
231 trailing 0s should be optional | |
232 | |
233 Documentation: | |
234 -------------- | |
235 | |
236 * parse_datetime: | |
237 - complete documentation to show what this function allows, but ISO forbids. | |
238 and vice verse. | |
239 - support other separators between date and time than 'T' | |
240 | |
241 * parse_date: | |
242 - yeardigits should be always greater than 4 | |
243 - dates before 0001-01-01 are not supported | |
244 | |
245 * parse_duration: | |
246 - alternative formats are not fully supported due to parse_date restrictions | |
247 - standard duration format is fully supported but not very restrictive. | |
248 | |
249 * Duration: | |
250 - support fractional years and month in calculations | |
251 - implement w3c order relation? (`<http://www.w3.org/TR/xmlschema-2/#duration-order>`_) | |
252 - refactor to have duration mathematics only at one place. | |
253 - localize __str__ method (does timedelta do this?) | |
254 - when is a Duration negative? | |
255 - normalize Durations. months [00-12] and years ]-inf,+inf[ | |
256 | |
257 |