简体   繁体   中英

How to get date in Scheme/Racket?

I have been trying to write Scheme code to get the date and store the month in a variable, but have no clue how, even after reading the online manual .

What I understand now is there is a struct called Date that needs 10 arguments, but not sure how to retrieve the month, or even date, from the library..could anyone please enlighten me on this.

Thank you.

I found it..

(let ((date (seconds->date (current-seconds))))
  (display (date-month date)))

working the manual took more effort than i thought.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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