Thanks for sharing this. I like your approach. What are your thoughts on ensuring that "a" and "b" are within the same time.Location (Timezone) as each other?
For my thinking if they are in different time zones they might be viewed as in a different YearDay than accurate for the two.
I passed in time.Location, used that instead of time.UTC (although that seems moot, except for the benefits of the simplicity of consistency) and ensured that "a" and "b" are in the same TZ.
I spend a lot of time thinking about code, how it should be written and why. Have worked on big things and small things. For every book I read, I buy 5 more.
Thanks for sharing this. I like your approach. What are your thoughts on ensuring that "a" and "b" are within the same time.Location (Timezone) as each other?
For my thinking if they are in different time zones they might be viewed as in a different YearDay than accurate for the two.
I passed in time.Location, used that instead of time.UTC (although that seems moot, except for the benefits of the simplicity of consistency) and ensured that "a" and "b" are in the same TZ.
That sounds extremely reasonable. 🙂