Calendar day module compilation.

This commit is contained in:
Dominik Pantůček 2023-05-10 14:49:20 +02:00
parent 85c673332b
commit f6a32e7ff6
2 changed files with 9 additions and 2 deletions

View file

@ -365,3 +365,8 @@ CAL-PERIOD-SOURCES=cal-period.scm cal-month.import.scm \
cal-period.o: cal-period.import.scm
cal-period.import.scm: $(CAL-PERIOD-SOURCES)
CAL-DAY-SOURCES=cal-day.scm util-tag.import.scm cal-month.import.scm
cal-day.o: cal-day.import.scm
cal-day.import.scm: $(CAL-DAY-SOURCES)

View file

@ -53,8 +53,10 @@
y m d))
;; Returns true if this is a leap year
(define (cal-year-leap y)
#f)
(define (cal-year-leap? y)
(and (= (modulo y 4) 0)
(or (not (= (modulo y 100) 0))
(= (modulo y 400) 0))))
;; Returns the number of days of given month
(define (cal-month-days y/m . ms)