Utilities for discovering and working with time zones.
Utilities for discovering and working with time zones.
(available-time-zones)Return all available time zone IDs as a sorted vector.
Return all available time zone IDs as a sorted vector.
Commonly used time zones (recommended over deprecated 3-letter codes).
Commonly used time zones (recommended over deprecated 3-letter codes).
(find-time-zones query)Search for time zones containing the given string (case-insensitive). Spaces in the query are replaced with underscores to match zone ID format.
Examples: (find-time-zones "new york") ; => ["America/New_York"] (find-time-zones "berlin") ; => ["Europe/Berlin"] (find-time-zones "america") ; => ["America/Chicago" "America/Denver" ...]
Search for time zones containing the given string (case-insensitive). Spaces in the query are replaced with underscores to match zone ID format. Examples: (find-time-zones "new york") ; => ["America/New_York"] (find-time-zones "berlin") ; => ["Europe/Berlin"] (find-time-zones "america") ; => ["America/Chicago" "America/Denver" ...]
(time-zone-info zone-str)Return helpful information about a time zone.
Returns a map with: :id - the time zone ID :offset - current UTC offset (e.g. "-05:00") :dst? - whether DST is currently in effect :display-name - human-readable name
Example: (time-zone-info "America/New_York") ; => {:id "America/New_York" ; :offset "-05:00" ; :dst? false ; :display-name "Eastern Standard Time"}
Return helpful information about a time zone.
Returns a map with:
:id - the time zone ID
:offset - current UTC offset (e.g. "-05:00")
:dst? - whether DST is currently in effect
:display-name - human-readable name
Example:
(time-zone-info "America/New_York")
; => {:id "America/New_York"
; :offset "-05:00"
; :dst? false
; :display-name "Eastern Standard Time"}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 |