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

help on padding

 [1/2] from: carlos:lorenz at: 26-Nov-2000 10:38


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 ]

 [2/2] 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
<<quoted lines omitted: 14>>
> ; 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-

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted