Liking cljdoc? Tell your friends :D

second-date.parse


all-supported-fieldsclj

(all-supported-fields temporal-accessor)

Returns a map of supported temporal field lisp-style name -> value, e.g.

(parse-special-case (.parse (b/formatter (b/value :year 4) (b/value :iso/week-of-year 2)) "201901")) ;; -> {:year 2019, :iso-week-of-year 1}

Returns a map of supported temporal field lisp-style name -> value, e.g.

(parse-special-case (.parse
                     (b/formatter
                      (b/value :year 4)
                      (b/value :iso/week-of-year 2))
                     "201901"))
;; -> {:year 2019, :iso-week-of-year 1}
sourceraw docstring

parseclj

(parse s)
(parse formatter s)

Parse almost any temporal literal String to a java.time object.

(second-date/parse "2020-04") ;; -> #object[java.time.LocalDate 0x1998e54f "2020-04-01"]

(second-date/parse "2020-04-01") ;; -> #object[java.time.LocalDate 0x1998e54f "2020-04-01"]

(second-date/parse "2020-04-01T15:01") ;; -> #object[java.time.LocalDateTime 0x121829b7 "2020-04-01T15:01"]

(second-date/parse "2020-04-01T15:01-07:00") ;; -> #object[java.time.OffsetDateTime 0x7dc126b0 "2020-04-01T15:01-07:00"]

(second-date/parse "2020-04-01T15:01-07:00[US/Pacific]") ;; -> #object[java.time.ZonedDateTime 0x351fb7c8 "2020-04-01T15:01-07:00[US/Pacific]"]

Parse almost any temporal literal String to a `java.time` object.

(second-date/parse "2020-04")
;; -> #object[java.time.LocalDate 0x1998e54f "2020-04-01"]

(second-date/parse "2020-04-01")
;; -> #object[java.time.LocalDate 0x1998e54f "2020-04-01"]

(second-date/parse "2020-04-01T15:01")
;; -> #object[java.time.LocalDateTime 0x121829b7 "2020-04-01T15:01"]

(second-date/parse "2020-04-01T15:01-07:00")
;; -> #object[java.time.OffsetDateTime 0x7dc126b0 "2020-04-01T15:01-07:00"]

(second-date/parse "2020-04-01T15:01-07:00[US/Pacific]")
;; -> #object[java.time.ZonedDateTime 0x351fb7c8 "2020-04-01T15:01-07:00[US/Pacific]"]
sourceraw docstring

parse-with-formatterclj

(parse-with-formatter formattr s)

Parse a String with a DateTimeFormatter, returning an appropriate instance of an java.time temporal class.

Parse a String with a DateTimeFormatter, returning an appropriate instance of an `java.time` temporal class.
sourceraw docstring

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

× close