A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
While I was trying to handle the non-commercial week of the year (which is where the week starts on a sunday). I realized there were scenarios where you could mix commercial date stuff with non-commercial date stuff so had to come up with a consolidated way to handle that. I came up with always converting day of week to a monday start based day of week.
This made all our other scenarios pass without so much conditional logic and seems to handle this mix/match stuff as well.
While I was trying to handle the non-commercial week of the year (which is where the week starts on a sunday). I realized there were scenarios where you could mix commercial date stuff with non-commercial date stuff so had to come up with a consolidated way to handle that. I came up with always converting day of week to a monday start based day of week.
This made all our other scenarios pass without so much conditional logic and seems to handle this mix/match stuff as well.