diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-12 02:19:19 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-21 15:16:42 +0200 |
commit | 6700803cb25f4c35f72e0e0683f53cfc3317f37c (patch) | |
tree | c95b042cf255bc3a1e4fc9bc7f0726759bddfa95 /module | |
parent | Fix some translations not being evaluated. (diff) | |
download | calp-6700803cb25f4c35f72e0e0683f53cfc3317f37c.tar.gz calp-6700803cb25f4c35f72e0e0683f53cfc3317f37c.tar.xz |
Simplify week-day-name.
The out of range exception could never occur, since I aleready limited
the interval to (n % 7) + 1.
Diffstat (limited to '')
-rw-r--r-- | module/datetime.scm | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/module/datetime.scm b/module/datetime.scm index adff669a..140c05db 100644 --- a/module/datetime.scm +++ b/module/datetime.scm @@ -386,13 +386,7 @@ key: (locale %global-locale)) ;; NOTE this allows days larger than 7 (sunday if counting from monday). - (let ((str (catch 'out-of-range - (lambda () (locale-day (1+ (modulo week-day-number 7)) locale)) - (lambda (oor str num) - (scm-error 'out-of-range "week-day-name" - "~a == (~a % 7) + 1" - (list num week-day-number) - #f))))) + (let ((str (locale-day (1+ (modulo week-day-number 7)) locale))) ;; I also know about the @var{locale-day-short} method, but I need ;; strings of length 2. (if truncate-to |