diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 23:46:57 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 23:46:57 +0200 |
commit | 9c94e6ec731ce433aadf12eae22d50e8fec7a91b (patch) | |
tree | dc3db263ba5c2afc725c5d163460597f233c1c8d /module/calp/html/view/small-calendar.scm | |
parent | Reformat test/datetime.scm (diff) | |
download | calp-9c94e6ec731ce433aadf12eae22d50e8fec7a91b.tar.gz calp-9c94e6ec731ce433aadf12eae22d50e8fec7a91b.tar.xz |
Remove (add|remove)-day, and month[+-].
Procedures where overly specific, and doing it manually was almost no
more work.
Diffstat (limited to 'module/calp/html/view/small-calendar.scm')
-rw-r--r-- | module/calp/html/view/small-calendar.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/module/calp/html/view/small-calendar.scm b/module/calp/html/view/small-calendar.scm index 4d40c57c..06a3342f 100644 --- a/module/calp/html/view/small-calendar.scm +++ b/module/calp/html/view/small-calendar.scm @@ -1,16 +1,17 @@ (define-module (calp html view small-calendar) :use-module ((calp html components) :select (xhtml-doc include-css)) :use-module ((calp html caltable) :select (cal-table)) - :use-module ((datetime) :select (month- month+ remove-day date->string)) + :use-module ((datetime) :select (date date+ date- date->string)) :export (render-small-calendar) ) (define (render-small-calendar month standalone) (define table (cal-table start-date: month - end-date: (remove-day (month+ month)) - next-start: month+ - prev-start: month- + end-date: (date- (date+ month (date month: 1)) + (date day: 1)) + next-start: (lambda (d) (date+ d (date day: 7))) + prev-start: (lambda (d) (date- d (date day: 7))) )) (if standalone (xhtml-doc |