Ticket #65 (closed defect: fixed)

Opened 4 months ago

Last modified 2 months ago

Creation of quarterly Date broken with datetime

Reported by: Ludwig Brinckmann Assigned to:
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

09/27/08 08:08:33 changed by mattknox_ca

  • status changed from new to closed.
  • resolution set to fixed.

fixed in revision 1479