Next_new_Moon gives wrong date
Bug #554113 reported by
Richard Hollands
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyEphem |
Invalid
|
Medium
|
Unassigned |
Bug Description
ephem.next_
gives:
2010/1/30 06:17:33
but
ephem.next_
gives
2009/9/4 16:02:34
ephem.previous_
gives
2009/12/31 19:12:43
but
ephem.previous_
gives
2009/8/6 00:54:50
But set:
d1 = ephem.next_
and
ephem.next_
gives
2010/3/20 17:32:09
To post a comment you must log in.
That's because the "ephem" library thinks that "2010-03" means the "negative 3" month of 2010 — the third-from- the-last- month of 2009, in other words. You can see this by constructing plain Date objects:
>>> ephem.Date( '2010/03' ) '2010-03' )
2010/3/1 00:00:00
>>> ephem.Date(
2009/9/1 00:00:00
Are you asking for "-" to become a new date separator character? So far PyEphem has just supported "/", like the astronomy library it is built upon, and so we would have to think through the implications of changing it. I wonder if anybody has ever used the negative-number functionality? I wasn't even sure, until I saw this report, that I myself knew that "2010-03" was even a valid PyEphem date! :-)