Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/jolt/time/fmt.clj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
(cond (and (impl/jt? l) (= :jolt.time/locale (impl/type-of l))) (impl/field l :id)
(string? l) l :else "en"))

;; .parse below calls the pattern parser defined further down in this file.
(declare parse-with-pattern)

(__register-class-methods! :jolt.time/dt-formatter
{"format" (fn [self v] (format-pattern (fmt-pattern self) v (fmt-locale self)))
"withLocale" (fn [self l] (formatter (fmt-pattern self) (locale-id l)))
Expand Down
5 changes: 5 additions & 0 deletions src/jolt/time/zoned.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

(defn- offset-suffix [secs] (z/zo-id secs))

;; the ZonedDateTime methods below call the OffsetDateTime constructor
;; (toOffsetDateTime), which the OffsetDateTime section defines further down.
;; Declare it so the reference resolves when the method map is compiled.
(declare odt)

;; --- ZonedDateTime -----------------------------------------------------------
(defn zdt [ed nod off zid] (impl/value :jolt.time/zoned-date-time {:ed ed :nod nod :off off :zid zid}))
(defn- zdt-ed [x] (impl/field x :ed))
Expand Down
Loading