Suppose I have a particular UTC time T
. I would like a method that returns true if it is possible that at least one spot somewhere else on Earth has the same local date as T
right now.
def still_same_date?(t)
# true
# if it is the same day at some other place on Earth
# false
# otherwise
end
For example, let's say T
is today at 12:01 AM in my local time. Then clearly it's true, because anyplace east of me will also have today's date (it is later in the day at those spots).
But if T
is yesterday at 4:00 PM in my local time, it is no longer obviously true that there is another place on Earth that still has that date.
And if T
is January 1, 2000 at 6:58 PM in my local time, it is obviously false that there is another place on Earth with the same date.
How can I write still_same_date?
so that it returns what I want?