Dates in international standard format are wrongly interpreted
Bug #792321 reported by
Gareth Rees
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyEphem |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
PyEphem's Date class appears to accept dates in international standard (ISO 8601) format, but in fact it mis-interprets them. For example,
>>> from ephem import *
>>> Date('2011-05-04')
2010/6/26 00:00:00
It would be nice if international standard dates were accepted, but if this is not possible, then it would be better if incorrectly formatted dates caused an exception (e.g. ValueError) to be raised rather than being silently accepted but mis-interpreted.
See this question on Stack Overflow <http://
To post a comment you must log in.
The underlying astronomy library thought that minus signs were useful for arithmetic (!), so "1999-05" means "five months before the beginning of 1999." I have removed this distinction in my version of the library so they are now simply a separator, exactly as you suggest. I am releasing 3.7.5.1 tonight that incorporates this improvement. Thank you!