timex icon indicating copy to clipboard operation
timex copied to clipboard

Timex.shift yields incorrect results for leap year after update

Open rizasal opened this issue 3 years ago • 1 comments

Steps to reproduce

  • API function called - Timex.shift
  • Arguments provided - Timex.shift(~D[2020-02-29], years: 1)

Description of issue

  • The same arguments on version 3.6.1 yields the correct result of ~D[2021-02-28] whereas the latest version 3.7.6 yields ~D[2021-03-01]
image

rizasal avatar Mar 21 '22 12:03 rizasal

As I see in the test the changes seem to be wanted. The question is why the previous behavior has been changed ? Thanks

elielhaouzi avatar Apr 21 '22 11:04 elielhaouzi