Fork me on GitHub
#juxt
<
2022-11-14
>
zeitstein08:11:53

Anyone else finding the behaviour of t/end on dates unintuitive? Example:

;; true
  (not= (t/today)
        (t/date (t/end (t/today))))

henryw37411:11:35

yeah. I agree it does seem odd. and inconsistent with the end of e.g. a Year

👍 1
henryw37416:11:24

well, maybe I'm not so sure. a day is normally 24 hours long. if we go the start of the day and move forward 24 hours, that should take us to the end of the day. which it does. but also happens to be the start of the next day.

(-> (t/beginning (t/date))
    (t/>> (t/new-duration 24 :hours)))