clj-cbor.tags.time

Built-in tag support for the time extensions in RFC 7049. See section 2.4.1.

This namespace offers interop with both the older java.util.Date class as well as the newer java.time.Instant. Support for both timestamp-based tagged values and the more efficient epoch-based values is included.

date-read-handlers

Map of tag handlers to parse date-times as java.util.Date values.

epoch-time-tag

Tag value 1 is for numerical representation of seconds relative to 1970-01-01T00:00Z in UTC time.

The tagged item can be a positive or negative integer (major types 0 and 1), or a floating-point number (major type 7 with additional information 25, 26, or 27). Note that the number can be negative (time before 1970-01-01T00:00Z) and, if a floating-point number, indicate fractional seconds.

epoch-time-write-handlers

Map of date-time types to render as tag 1 epoch offsets.

format-date-epoch

(format-date-epoch value)

format-date-string

(format-date-string value)

format-instant-epoch

(format-instant-epoch value)

format-instant-string

(format-instant-string value)

instant-read-handlers

Map of tag handlers to parse date-times as java.time.Instant values.

parse-epoch-date

(parse-epoch-date value)

parse-epoch-instant

(parse-epoch-instant value)

parse-string-date

(parse-string-date value)

parse-string-instant

(parse-string-instant value)

string-time-tag

Tag value 0 is for date/time strings that follow the standard format described in RFC3339, as refined by Section 3.3 of RFC4287.

string-time-write-handlers

Map of date-time types to render as tag 0 time strings.