Skip to content

Fix incorrect date selection ranges for history and logbook#8045

Merged
bramkragten merged 2 commits intohome-assistant:devfrom
spacegaier:issue-7147
Jan 4, 2021
Merged

Fix incorrect date selection ranges for history and logbook#8045
bramkragten merged 2 commits intohome-assistant:devfrom
spacegaier:issue-7147

Conversation

@spacegaier
Copy link
Copy Markdown
Member

Breaking change

Proposed change

Fix incorrect date selection ranges that can appear if we are either at the beginning or the end of a month where the selection for "This Week" or "Last Week" crosses the month border.

E.g. today (29.12.) the calculation for "This Week" has an end date that lies already in January. Since the same todayCopy value is then also used to set "Last Week", we end up in the wrong month. The same can happen at the beginning of a month. Both cases are fixed now for history and logbook.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@spacegaier spacegaier added this to the 2021.1.0 milestone Jan 2, 2021
@spacegaier spacegaier removed this from the 2021.1.0 milestone Jan 2, 2021
@bramkragten bramkragten merged commit e6d38f4 into home-assistant:dev Jan 4, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2021
@spacegaier spacegaier deleted the issue-7147 branch January 5, 2021 11:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

History's "Last week" option goes one month ahead.

3 participants