Liking cljdoc? Tell your friends :D

java-time.format


formatclj

(format o)
(format fmt o)

Formats the given time entity as a string.

Accepts something that can be converted to a DateTimeFormatter or a formatter key, e.g. :iso-offset-time, as a first argument. Given one argument uses the default format.

(format (zoned-date-time)) "2015-03-21T09:22:46.677800+01:00[Europe/London]"

(format :iso-date (zoned-date-time)) "2015-03-21+01:00"

Formats the given time entity as a string.

Accepts something that can be converted to a `DateTimeFormatter` or a
formatter key, e.g. `:iso-offset-time`, as a first argument. Given one
argument uses the default format.

  (format (zoned-date-time))
  "2015-03-21T09:22:46.677800+01:00[Europe/London]"

  (format :iso-date (zoned-date-time))
  "2015-03-21+01:00"
sourceraw docstring

formatterclj

(formatter fmt)
(formatter fmt {:keys [resolver-style case] :or {case :sensitive}})

Constructs a DateTimeFormatter out of a

  • format string - "yyyy/MM/dd", "HH:mm", etc.
  • formatter name - :iso-date, :iso-time, etc.

Accepts a map of options as an optional second argument:

  • resolver-style - either :strict, :smartor :lenient
  • case - either :insensitive or :sensitive (defaults to :sensitive)
Constructs a DateTimeFormatter out of a

* format string - "yyyy/MM/dd", "HH:mm", etc.
* formatter name - :iso-date, :iso-time, etc.

Accepts a map of options as an optional second argument:

* `resolver-style` - either `:strict`, `:smart `or `:lenient`
* `case` - either `:insensitive` or `:sensitive` (defaults to :sensitive)
sourceraw docstring

parseclj

(parse fmt o)
(parse fmt o opts)
source

predefined-formattersclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close