Finish util-time documentation.
This commit is contained in:
parent
507e8e9043
commit
cf4211d1ba
2 changed files with 10 additions and 5 deletions
|
@ -18,4 +18,10 @@ Returns the current milliseconds counter that can be used for high-precision tim
|
||||||
|
|
||||||
(seconds->iso-date-string . args)
|
(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.
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
(current-process-milliseconds))))
|
(current-process-milliseconds))))
|
||||||
|
|
||||||
(define/doc (seconds->iso-date-string . args)
|
(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)))
|
(let ((d (apply seconds->local-time args)))
|
||||||
(format "~A-~A-~A"
|
(format "~A-~A-~A"
|
||||||
(number->string
|
(number->string
|
||||||
|
@ -69,9 +69,8 @@
|
||||||
(+ 100 (vector-ref d 3)))
|
(+ 100 (vector-ref d 3)))
|
||||||
1))))
|
1))))
|
||||||
|
|
||||||
;;; Returns today as YYYY-MM-DD string
|
(define/doc (today/iso)
|
||||||
(define (today/iso)
|
("Returns today as ISO date string YYYY-MM-DD.")
|
||||||
(seconds->iso-date-string))
|
(seconds->iso-date-string))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue