diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 01:30:03 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 01:30:03 +0200 |
commit | 36d1aac8f08bc20e499563805a280a795f9cdfb2 (patch) | |
tree | ea42d4466e61c522612c4b1cbf9e6add5e648758 /module/datetime | |
parent | HTML Description exception handler now works. (diff) | |
download | calp-36d1aac8f08bc20e499563805a280a795f9cdfb2.tar.gz calp-36d1aac8f08bc20e499563805a280a795f9cdfb2.tar.xz |
Add some comments.
Diffstat (limited to 'module/datetime')
-rw-r--r-- | module/datetime/util.scm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/datetime/util.scm b/module/datetime/util.scm index a8ccda07..8c57636e 100644 --- a/module/datetime/util.scm +++ b/module/datetime/util.scm @@ -116,6 +116,9 @@ (date+ ystart (date day: (abs day-index))) (date- ystart (date day: day-index))))) +;; TODO v. 1 sometimes is calculated wrong. +;; (week-number #2020-01-01 mon) ; => 1 +;; (week-number #2019-12-31 mon) ; => 53 ; should be 1 (define*-public (week-number date optional: (wkst sun)) (let* ((week day (floor/ (days-in-interval (week-1-start date wkst) date) 7))) @@ -300,6 +303,7 @@ (* 12 (year diff))) (month-stream start-date))))))) +;; also known as Julian day. (define-public (year-day date) (days-in-interval (start-of-year date) date)) |