Re: [Datetime-SIG] Calendar vs timespan calculations...
On Sat, Aug 1, 2015 at 10:36 AM, Alexander Belopolsky <alexander.belopolsky@gmail.com> wrote:
So how do you represent three outcomes [], [u] or [u0, u1] in a way that xG(t) always works? My solution:
[] -> [u1, u0] [u] -> [u, u] [u0, u1] -> [u0, u1]
Let me clarify what I propose to return for the local time in a gap: the two values u1 and u0 are *not* solutions to L(u) = t. For t in a gap, no such solutions exist. Instead, u0 is the solution for L0(u) = t where L0 is L linearly extrapolated from the times before the gap forward and u1 is the solution for L1(u) = t where L1 is L linearly extrapolated from the times after the gap back. In the case of the US-style spring jump from 01:59 to 03:00 AM, for t = 02:30 AM, u0 is such that L(u0) = 03:30 AM (this is the "what a meant when I said 02:30" time) and L(u1) = 01:30 AM.
participants (1)
-
Alexander Belopolsky