Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: help on padding

From: petr::krenzelok::trz::cz at: 26-Nov-2000 14:08

----- Original Message ----- From: Mailbank <[carlos--lorenz--net]> To: <[rebol-list--rebol--com]> Sent: Sunday, November 26, 2000 1:38 PM Subject: [REBOL] help on padding
> 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]
what about the last argument of your block? Shouldn't it be dt/day??? Cheers, -pekr-