簡體   English   中英

如何在Scheme / DrRacket的R5R中獲取系統日期

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

在DrRacket IDE中,當語言設置為“ Swindle”時,我可以通過以下方式獲取系統日期:

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

現在,我需要在R5R中執行相同的操作,但不確定如何操作。 我可以在這方面尋求您的建議/幫助。

謝謝!

R5RS中沒有日期時間支持。 在PLTRacket的R5RS實現中,應使用current-secondsseconds->datedate-month這一過程作為擴展。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM