mirror of https://codeberg.org/cage/tinmop/
- prefixed all parsing rule for date formatting to avoid clash with other rules in the code.
This commit is contained in:
parent
74c78adc6a
commit
1e3854989b
|
@ -20,7 +20,7 @@
|
||||||
;; FIELD := [%hour %minute %second %month %year %day %weekday %%]
|
;; FIELD := [%hour %minute %second %month %year %day %weekday %%]
|
||||||
;; TEXT := (not percent)+
|
;; TEXT := (not percent)+
|
||||||
|
|
||||||
(defrule field
|
(defrule date-formatter-field
|
||||||
(or "%hour"
|
(or "%hour"
|
||||||
"%min"
|
"%min"
|
||||||
"%second"
|
"%second"
|
||||||
|
@ -35,10 +35,10 @@
|
||||||
"%%")
|
"%%")
|
||||||
(:text t))
|
(:text t))
|
||||||
|
|
||||||
(defrule text (+ (not percent))
|
(defrule date-formatter-text (+ (not date-formatter-percent))
|
||||||
(:text t))
|
(:text t))
|
||||||
|
|
||||||
(defrule format (* (or field text)))
|
(defrule date-formatter-format (* (or date-formatter-field date-formatter-text)))
|
||||||
|
|
||||||
(defun expand-date-formatter-spec (spec)
|
(defun expand-date-formatter-spec (spec)
|
||||||
"Expand a date spec like '%year %short-month %day %hour:%min'
|
"Expand a date spec like '%year %short-month %day %hour:%min'
|
||||||
|
|
Loading…
Reference in New Issue