New day period exports.
This commit is contained in:
parent
71687849c4
commit
f639ec5753
1 changed files with 15 additions and 0 deletions
|
@ -44,6 +44,9 @@
|
|||
|
||||
cal-month-in-period?
|
||||
cal-month-in-periods?
|
||||
|
||||
cal-day-in-period?
|
||||
cal-day-in-periods?
|
||||
|
||||
cal-periods->string
|
||||
cal-periods-match
|
||||
|
@ -227,6 +230,18 @@
|
|||
(cal-day<? d before))
|
||||
(not (cal-day<? d since)))))
|
||||
|
||||
;; Returns true if the day belongs to at least one period
|
||||
(define (cal-day-in-periods? ps . dl)
|
||||
(let ((d (if (null? dl)
|
||||
(*current-day*)
|
||||
(cal-ensure-day (car dl)))))
|
||||
(let loop ((ps ps))
|
||||
(if (null? ps)
|
||||
#f
|
||||
(if (cal-day-in-period? (car ps) d)
|
||||
#t
|
||||
(loop (cdr ps)))))))
|
||||
|
||||
;; Returns string representing a month period with possibly open end.
|
||||
(define (cal-period->string p)
|
||||
(sprintf "~A..~A"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue