Move current-month to period module.
This commit is contained in:
parent
cff5009a3c
commit
94cf210ac4
2 changed files with 16 additions and 2 deletions
|
@ -28,8 +28,6 @@
|
||||||
(module
|
(module
|
||||||
configuration
|
configuration
|
||||||
(
|
(
|
||||||
*current-month*
|
|
||||||
|
|
||||||
*etc-hackerbase*
|
*etc-hackerbase*
|
||||||
|
|
||||||
*members-directory*
|
*members-directory*
|
||||||
|
|
|
@ -28,19 +28,28 @@
|
||||||
(module
|
(module
|
||||||
period
|
period
|
||||||
(
|
(
|
||||||
|
*current-month*
|
||||||
|
|
||||||
make-period
|
make-period
|
||||||
|
|
||||||
period-since
|
period-since
|
||||||
period-before
|
period-before
|
||||||
period-scomment
|
period-scomment
|
||||||
period-bcomment
|
period-bcomment
|
||||||
|
|
||||||
period-markers->periods
|
period-markers->periods
|
||||||
|
|
||||||
periods-duration
|
periods-duration
|
||||||
|
|
||||||
month-in-period?
|
month-in-period?
|
||||||
month-in-periods?
|
month-in-periods?
|
||||||
|
|
||||||
periods->string
|
periods->string
|
||||||
periods-match
|
periods-match
|
||||||
|
|
||||||
make-period-lookup-table
|
make-period-lookup-table
|
||||||
lookup-by-period
|
lookup-by-period
|
||||||
|
|
||||||
period-tests!
|
period-tests!
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -55,6 +64,13 @@
|
||||||
testing
|
testing
|
||||||
configuration)
|
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
|
;; Creates a new period value with optional since and before
|
||||||
;; comments.
|
;; comments.
|
||||||
(define (make-period since before . args)
|
(define (make-period since before . args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue