如何在Scheme / DrRacket中的R5R中获取系统日期 [英] How to get system date in R5Rs in Scheme/DrRacket

查看:165
本文介绍了如何在Scheme / DrRacket中的R5R中获取系统日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在DrRacket IDE中,当语言设置为Swindle时,我可以按照以下方式获取系统日期:

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))
  )

现在,我需要在R5R中做同样的操作,但不知道该怎么做。我可以请你的建议/帮助这个..

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

谢谢!

推荐答案

在R5RS中没有日期时间支持。程序 current-seconds seconds-> date date-month 应该在作为扩展的PLTRacket的R5RS实现中可用。

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.

这篇关于如何在Scheme / DrRacket中的R5R中获取系统日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆