Given two date pairs represented as numbers [hour, weekday], where hour ranges from 0-23 and weekday ranges from 1-7. I am tasked with generating all the hours in between each pair. For example, if given [13, 2] and [2, 3], the output would be:
[13,2]
[14,2]
[15,2]
...
[0,3]
[1,3]
[2,3]
I also have the dates stored as datetimes, but I'm unsure which representation to utilize for the task at hand. The time interval between the two dates is always just a few days and does not span across weeks.