[英]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-seconds
, seconds->date
和date-month
這一過程作為擴展。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.