Skip to content

Commit

Permalink
Remove 24th hour from and add 0th hour to PartOfDay (#2167)
Browse files Browse the repository at this point in the history
* Remove 24th hour and add 0th hour

* Add release note
  • Loading branch information
tamargrey authored Jul 5, 2022
1 parent aac6e8c commit 629f046
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

Release Notes
-------------
.. Future Release
==============
Future Release
==============
* Enhancements
* Fixes
* Remove 24th hour from PartOfDay primitive and add 0th hour (:pr:`2167`)
* Changes
* Documentation Changes
* Testing Changes

.. Thanks to the following people for contributing to this release:
Thanks to the following people for contributing to this release:
:user:`tamargrey`


v1.11.0 Jun 30, 2022
====================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def construct_replacement_dict():
tdict[hour] = "evening"
for hour in [20, 21, 22]:
tdict[hour] = "night"
for hour in [23, 24, 1, 2, 3]:
for hour in [23, 0, 1, 2, 3]:
tdict[hour] = "midnight"
return tdict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def test_part_of_day():
pod = PartOfDay()
dates = pd.Series(
[
datetime(2020, 1, 11, 0, 2, 1),
datetime(2020, 1, 11, 1, 2, 1),
datetime(2021, 3, 31, 4, 2, 1),
datetime(2020, 3, 4, 6, 2, 1),
Expand All @@ -195,6 +196,7 @@ def test_part_of_day():
actual = pod(dates)
expected = pd.Series(
[
"midnight",
"midnight",
"dawn",
"early morning",
Expand Down

0 comments on commit 629f046

Please sign in to comment.