Rebol Programming/request-date

From Wikibooks, open books for an open world
< Rebol Programming
Jump to navigation Jump to search

USAGE:[edit | edit source]

REQUEST-DATE /offset xy /date when 

DESCRIPTION:[edit | edit source]

Requests a date.

REQUEST-DATE is a function value.

REFINEMENTS[edit | edit source]

  • /offset
    • xy -- (Type: any)
  • /date
    • when -- Default date (Type: any)

SOURCE CODE[edit | edit source]

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]