Using the function below I'd like to get a sequence of seven days
starting from a date entered by the user but don't understand why 
it does not work. Could you help me?

Thanks
--Carlos

REBOL[]

; Joel Nelly's function
zpad: func[n [number!] w[integer!] /local s][
  s: to-string n
  if w > length? s [            
     insert/dup s "0" (w - length? s)   
  ]
  s
]


dt: to-date ask "Enter start day: "

repeat i 7 [

   ; does not work
   print rejoin[zpad dt/year 4 zpad dt/month 2 zpad dt/month 2]   

   ; this works fine
   print dt

   dt: dt + 1
]
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to