Fork me on GitHub
#juxt
<
2020-07-09
>
otfrom08:07:50

I think it might just be a problem with trying to figure out sensible defaults when going from a date to a date-time

otfrom08:07:25

and I've got start/end dates and the swap from one interval to another happens at some point on the end of the old to the start of the new

dvingo11:07:53

It looks like this is because this is what new-interval is doing:

{:tick/beginning (t/beginning (t/bounds (t/date "2020-01-01")))
 :tick/end       (t/end (t/bounds (t/date "2020-01-02")))}

otfrom12:07:16

@danvingo yes, that looks right to me. So I just need to tweak the beginning and end dates if I'm only passing in dates. I wonder if there should be different behaviour if an interval is only made of dates rather than date times

dvingo13:07:24

I don't think bounds works for date-times because ITimeSpan just returns the date-time itself for beginning and end:

(t/beginning (t/date-time "2020-01-02T00:00"))
=> #time/date-time"2020-01-02T00:00"
(t/end (t/date-time "2020-01-02T00:00"))
=> #time/date-time"2020-01-02T00:00"
https://github.com/juxt/tick/blob/master/src/tick/core.cljc#L1034