aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/datetime/util.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/datetime/util.scm b/module/datetime/util.scm
index 4e781806..681dd868 100644
--- a/module/datetime/util.scm
+++ b/module/datetime/util.scm
@@ -134,11 +134,12 @@
(date day: (* week-number 7))))
-(define*-public (week-day-name week-day-number optional: truncate-to)
+(define*-public (week-day-name week-day-number optional: truncate-to
+ 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))))
+ (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) (list week-day-number))))))