简体   繁体   English

如何在Scheme / DrRacket的R5R中获取系统日期

[英]How to get system date in R5Rs in Scheme/DrRacket

In DrRacket IDE, I was able to get the system date in the following manner when the language setting was 'Swindle': 在DrRacket IDE中,当语言设置为“ 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. 现在,我需要在R5R中执行相同的操作,但不确定如何操作。 May I please seek your advise/help on this.. 我可以在这方面寻求您的建议/帮助。

Thank you! 谢谢!

There is no date-time support in R5RS. R5RS中没有日期时间支持。 The procedures current-seconds , seconds->date and date-month should be available in the R5RS implementation of PLTRacket as extensions. 在PLTRacket的R5RS实现中,应使用current-secondsseconds->datedate-month这一过程作为扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM