跳轉到內容

Rebol 程式設計/request-date

來自華夏公益教科書,開放的書籍,開放的世界
REQUEST-DATE /offset xy /date when 

請求一個日期。

REQUEST-DATE 是一個函式值。

  • /offset
    • xy -- (型別:任何)
  • /date
    • when -- 預設日期 (型別:任何)

原始碼

[編輯 | 編輯原始碼]
request-date: func [
    "Requests a date." 
    /offset xy 
    /date when "Default date"
][
    result: when 
    base: today: any [when now/date] 
    either date-lay [calc-month base/month] [init] 
    either offset [inform/offset date-lay xy] [inform date-lay] 
    result
]
華夏公益教科書