In my test I have a line (added just 2 month ago) that used to work, but fails today.
It's not wrapped in any timecop helpers. Actually I could reproduce it in irb:
> Date.strptime('wednesday', '%A')
(irb):2:in `<main>': invalid date (Date::Error)
Date.strptime_without_mock_date("#{year} #{week} #{d[:wday]}", '%Y %W %w', start)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
but original method works.
> Date.strptime_without_mock_date('wednesday', '%A')
Wed, 01 Jan 2025
UPD: the actual string it tries to parse is "2024 53 3" - which corresponds to 32 December 🤣
In my test I have a line (added just 2 month ago) that used to work, but fails today.
It's not wrapped in any timecop helpers. Actually I could reproduce it in irb:
but original method works.
UPD: the actual string it tries to parse is
"2024 53 3"- which corresponds to 32 December 🤣