Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: Release 1.4
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Using the tagged literal facility added in Clojure 1.4-alpha4, add support for an instance literal, adhering to RFC 3339 of the form:
date-year = 4DIGIT
date-month = 2DIGIT ; 01-12
date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
; month/year
time-hour = 2DIGIT ; 00-23
time-minute = 2DIGIT ; 00-59
time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
; rules
time-secfrac = '.' 1*DIGIT
time-numoffset = ('+' / '-') time-hour ':' time-minute
time-offset = 'Z' / time-numoffset
time-part = time-hour [ ':' time-minute [ ':' time-second [time-secfrac] [time-offset] ] ]
timestamp = date-year [ '-' date-month [ '-' date-mday [ 'T' time-part ] ] ]
The default object built with this literal would be a java.util.Date. A print-method for this type would also be required for this enhancement.
A dup of
CLJ-871. Patch and comments have been placed there.CLJ-871. Patch and comments have been placed there.