Ticket #65 (closed defect: fixed)
Creation of quarterly Date broken with datetime
| Reported by: | Ludwig Brinckmann | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | timeseries | Version: | |
| Keywords: | Cc: |
Description
Creating a Date object with datetime results in the wrong year.
import scikits.timeseries as ts
import datetime
t1 = ts.Date(freq='D', datetime=datetime.datetime(year=2007, month=1, day=1))
t2 = ts.Date(freq='Q', year=2007, quarter=1)
t3 = ts.Date(freq='Q', datetime=datetime.datetime(year=2007, month=1, day=1))
print t1.asfreq('Q'), t2, t3
assert t1.asfreq('Q') == t2 == t3
This results in:
2007Q1 2007Q1 1757Q1
Traceback (most recent call last):
File "timeseries02.py", line 10, in <module>
assert t1.asfreq('Q') == t2 == t3
AssertionError
Change History
Note: See
TracTickets for help on using
tickets.
