Move current-month to period module.

This commit is contained in:
Dominik Pantůček 2023-04-12 21:53:14 +02:00
parent cff5009a3c
commit 94cf210ac4
2 changed files with 16 additions and 2 deletions

View file

@ -28,8 +28,6 @@
(module
configuration
(
*current-month*
*etc-hackerbase*
*members-directory*

View file

@ -28,19 +28,28 @@
(module
period
(
*current-month*
make-period
period-since
period-before
period-scomment
period-bcomment
period-markers->periods
periods-duration
month-in-period?
month-in-periods?
periods->string
periods-match
make-period-lookup-table
lookup-by-period
period-tests!
)
@ -55,6 +64,13 @@
testing
configuration)
;; Current month - if changed, we get the actual state for given month.
(define *current-month*
(make-parameter
(let ((d (seconds->local-time (current-seconds))))
(list (+ 1900 (vector-ref d 5))
(+ (vector-ref d 4) 1)))))
;; Creates a new period value with optional since and before
;; comments.
(define (make-period since before . args)