Skip to content

Commit

Permalink
florian beispiel fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Oct 11, 2024
1 parent 27ded90 commit f5b30cc
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions lib/calendar/src/quanta/calendar/florian.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
[tick.core :as t]
[ta.calendar.calendars :as caldb]
[ta.calendar.helper :as calhelp]))



(defn market-info [market-kw]
(let [cal (caldb/get-calendar :us)
(let [cal (caldb/get-calendar market-kw)
dt (t/instant)
open? (calhelp/time-open? cal dt)
business? (calhelp/day-open? cal dt)]
Expand All @@ -18,21 +16,16 @@


(market-info :crypto)
;; => {:market :crypto,
;; :open? true,
;; :business true,
;; :as-of-dt #time/instant "2024-10-11T20:51:34.005611822Z"
;; => {:market :crypto, :open? true, :business true, :as-of-dt #time/instant "2024-10-11T20:57:54.366650110Z"}


(market-info :eu)
;; => {:market :eu,
;; :open? true,
;; :business true,
;; :as-of-dt #time/instant "2024-10-11T20:51:47.749174115Z"}
;; => {:market :eu, :open? true, :business true, :as-of-dt #time/instant "2024-10-11T20:58:03.620756893Z"}




(market-info :jp)
;; => {:market :jp,
;; :open? true,
;; :business true,
;; :as-of-dt #time/instant "2024-10-11T20:53:01.242739932Z"}
;; => {:market :jp, :open? true, :business true, :as-of-dt #time/instant "2024-10-11T20:58:13.100221665Z"}


0 comments on commit f5b30cc

Please sign in to comment.