Skip to content

Conversation

@JoseLion
Copy link
Contributor

@JoseLion JoseLion commented Jun 29, 2023

This Pr fixes a few inconsistencies with the .toMatchDateParts(..) method of the DateAssertion class.

  • The optionsToDate(..) helper should not use today's date to fill up the missing options. Using today's date causes inconsistencies around the date comparison whenever the current date is around the edges of the local time offset. I.e., today transforms into tomorrow because of the timezone change, which causes a different behavior.
  • The AssertionError message should compare the date with the options provided to clarify the assertion issue. Comparing only the two date was ambiguous for this assertion.

@JoseLion JoseLion self-assigned this Jun 29, 2023
@JoseLion JoseLion force-pushed the fix/to-match-date-parts branch from 16c122e to a4272b3 Compare June 29, 2023 22:10
Copy link
Contributor

@ChristianSama ChristianSama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JoseLion JoseLion merged commit f1002ed into main Jun 30, 2023
@JoseLion JoseLion deleted the fix/to-match-date-parts branch June 30, 2023 17:44
@github-actions
Copy link

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants