Finish util-time documentation.

This commit is contained in:
Dominik Pantůček 2023-07-04 20:52:42 +02:00
parent 507e8e9043
commit cf4211d1ba
2 changed files with 10 additions and 5 deletions

View file

@ -18,4 +18,10 @@ Returns the current milliseconds counter that can be used for high-precision tim
(seconds->iso-date-string . args)
Converts given seconds to ISO date string. Defaults to ```(current-seconds)```.
Converts given seconds to ISO date string YYYY-MM-DD. Defaults to ```(current-seconds)```.
### today/iso [procedure]
(today/iso)
Returns today as ISO date string YYYY-MM-DD.

View file

@ -55,7 +55,7 @@
(current-process-milliseconds))))
(define/doc (seconds->iso-date-string . args)
("Converts given seconds to ISO date string. Defaults to ```(current-seconds)```.")
("Converts given seconds to ISO date string YYYY-MM-DD. Defaults to ```(current-seconds)```.")
(let ((d (apply seconds->local-time args)))
(format "~A-~A-~A"
(number->string
@ -69,9 +69,8 @@
(+ 100 (vector-ref d 3)))
1))))
;;; Returns today as YYYY-MM-DD string
(define (today/iso)
(define/doc (today/iso)
("Returns today as ISO date string YYYY-MM-DD.")
(seconds->iso-date-string))
)