(-do-with-clock clock thunk)Implementation for with-clock.
Implementation for [[with-clock]].
(-do-with-locale locale-tag f)Sets the default locale temporarily to locale-tag, then invokes f and reverts the locale change
Sets the default locale temporarily to `locale-tag`, then invokes `f` and reverts the locale change
(-do-with-system-timezone-id timezone-id thunk)Implementation for with-system-timezone-id.
Implementation for [[with-system-timezone-id]].
(with-clock clock & body)Same as [[t/with-clock]], but adds [[testing]] context, and also supports using ZonedDateTime instances
directly (converting them to a mock clock automatically).
(mt/with-clock #t "2019-12-10T00:00-08:00[US/Pacific]" ...)
Same as [[t/with-clock]], but adds [[testing]] context, and also supports using `ZonedDateTime` instances
directly (converting them to a mock clock automatically).
(mt/with-clock #t "2019-12-10T00:00-08:00[US/Pacific]"
...)(with-locale locale-tag & body)Allows a test to override the locale temporarily
Allows a test to override the locale temporarily
(with-system-timezone-id timezone-id & body)Execute body with the system time zone temporarily changed to the time zone named by timezone-id.
Execute `body` with the system time zone temporarily changed to the time zone named by `timezone-id`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |