Skip to content

Commit

Permalink
Add datetime formats to dist
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-coram committed Jul 18, 2023
1 parent d9791a6 commit 001e239
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions chronogram-cldr-parser.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
(narrow . ,(funcall parse-era-narrow calendar))
(wide . ,(funcall parse-era-names calendar))))))

;; Date and time formats
;; Date, time and datetime formats
(parse-date-format
(lambda (format)
`((pattern . ,(plump:text (clss-select-first "pattern"
Expand All @@ -114,6 +114,14 @@
(gen-parse-fn "timeFormats > timeFormatLength"
parse-time-format
:intern-type t))
(parse-datetime-format
(lambda (format)
`((pattern . ,(plump:text (clss-select-first "pattern"
format))))))
(parse-datetime-formats
(gen-parse-fn "dateTimeFormats > dateTimeFormatLength"
parse-datetime-format
:intern-type t))

;; Calendar
(parse-calendar
Expand All @@ -132,7 +140,9 @@
(date-formats . ,(funcall parse-date-formats
calendar))
(time-formats . ,(funcall parse-time-formats
calendar)))))
calendar))
(datetime-formats . ,(funcall parse-datetime-formats
calendar)))))
:intern-type t)))
(defun parse-cldr (contents)
(let* ((root (plump:parse contents))
Expand Down

0 comments on commit 001e239

Please sign in to comment.