开发者

How to get system date in R5Rs in Scheme/DrRacket

开发者 https://www.devze.com 2023-01-27 11:49 出处:网络
In DrRacket IDE开发者_如何学Python, I was able to get the system date in the following manner when the language setting was \'Swindle\':

In DrRacket IDE开发者_如何学Python, I was able to get the system date in the following manner when the language setting was 'Swindle':

(define currentMonth 0)
(let ((date (seconds->date (current-seconds))))
  (set! currentMonth (date-month date))
  )

Now, I need to do the same in R5Rs, but not sure how to. May I please seek your advise/help on this..

Thank you!


There is no date-time support in R5RS. The procedures current-seconds, seconds->date and date-month should be available in the R5RS implementation of PLTRacket as extensions.

0

精彩评论

暂无评论...
验证码 换一张
取 消