Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v0.15.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,5 @@ Bug Fixes


- Fixed a bug where plotting a column ``y`` and specifying a label would mutate the index name of the original DataFrame (:issue:`8494`)

- Bug in ``date_range`` where partially-specified dates would incorporate current date (:issue:`6961`)
6 changes: 6 additions & 0 deletions pandas/tseries/tests/test_daterange.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ def test_range_closed(self):
self.assertTrue(expected_left.equals(left))
self.assertTrue(expected_right.equals(right))

def test_years_only(self):
# GH 6961
dr = date_range('2014', '2015', freq='M')
self.assertEqual(dr[0], datetime(2014, 1, 31))
self.assertEqual(dr[-1], datetime(2014, 12, 31))


class TestCustomDateRange(tm.TestCase):

Expand Down