How to get system date in R5Rs in Scheme/DrRacket

守給你的承諾、 提交于 2020-01-07 06:46:21

问题


In DrRacket IDE, 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!


回答1:


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.



来源:https://stackoverflow.com/questions/4295727/how-to-get-system-date-in-r5rs-in-scheme-drracket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!