-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hey 👋
First of all, thanks for the library, it has few neat ideas, especially around holidays.
Unfortunately, when I was playing with it, I have run into this error:
(ns timing-bug-repro
(:require [timing.core :as tc]
[timing.holiday.pl :as pl]))
(comment
;; actual holiday
(->> (tc/date 2025 11 11)
(tc/date->value)
(tc/day-context)
(pl/holiday?))
;;=> {:name #function[clojure.core/partial/fn--5927]}
;; no holiday
(->> (tc/date 2025 11 19)
(tc/date->value)
(tc/day-context)
(pl/holiday?))
;;=> nil
;; this date throws an exception
(->> (tc/date 2025 11 20)
(tc/date->value)
(tc/day-context)
(pl/holiday?))
;;=> Execution error (ExceptionInfo) at timing.holiday.compiler/compile-before-after$fn (compiler.cljc:278).
;; Unknown definition
;; timing.holiday.compiler/compile-before-after (compiler.cljc:278)
;; timing.holiday.pl/holiday? (pl.cljc:167)
;; clojure.core/some (core.clj:2718)
;; timing.holiday.pl/holiday? (pl.cljc:165)
;; timing-bug-repro/eval73074 (timing_bug_repro.cljc:25)
)Nothing special about this date, but I've noticed that it happens for 52 days in this year, but only in the Polish holiday calendar.
I have tested gb and us throughout the whole year and they didn't fail.
other dates throwing this error
2025-01-02
2025-01-09
2025-01-16
2025-01-23
2025-01-30
2025-02-06
2025-02-13
2025-02-20
2025-02-27
2025-03-06
2025-03-13
2025-03-20
2025-03-27
2025-04-03
2025-04-10
2025-04-17
2025-04-24
2025-05-01
2025-05-08
2025-05-15
2025-05-22
2025-05-29
2025-06-05
2025-06-12
2025-06-19
2025-06-26
2025-07-03
2025-07-10
2025-07-17
2025-07-24
2025-07-31
2025-08-07
2025-08-14
2025-08-21
2025-08-28
2025-09-04
2025-09-11
2025-09-18
2025-09-25
2025-10-02
2025-10-09
2025-10-16
2025-10-23
2025-10-30
2025-11-06
2025-11-13
2025-11-20
2025-11-27
2025-12-04
2025-12-11
2025-12-18
2025-12-25
Metadata
Metadata
Assignees
Labels
No labels