Skip to content

DateRange union bug caused by bad DateOffset comparison #456

@wesm

Description

@wesm

Reported by user

In [35]: rng1 = DateRange('12/5/2011', '12/5/2011')

In [36]: rng2 = DateRange('12/2/2011', '12/5/2011')

In [37]: rng1.union(rng2)
Out[37]: 
<class 'pandas.core.daterange.DateRange'>
offset: <1 BusinessDay>, tzinfo: None
[2011-12-02 00:00:00, ..., 2011-12-05 00:00:00]
length: 2

In [38]: rng2.offset = datetools.BDay()

In [39]: rng1.union(rng2)
Out[39]: Index([2011-12-02 00:00:00, 2011-12-05 00:00:00], dtype=object)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions