From 94cf210ac472ce69410a34ccfb38dcbd0c8668a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Wed, 12 Apr 2023 21:53:14 +0200 Subject: [PATCH] Move current-month to period module. --- src/configuration.scm | 2 -- src/period.scm | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/configuration.scm b/src/configuration.scm index d731ee8..6eb07ed 100644 --- a/src/configuration.scm +++ b/src/configuration.scm @@ -28,8 +28,6 @@ (module configuration ( - *current-month* - *etc-hackerbase* *members-directory* diff --git a/src/period.scm b/src/period.scm index 3a70ab5..38b744c 100644 --- a/src/period.scm +++ b/src/period.scm @@ -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)