[EMAIL PROTECTED] wrote:

> Hello, still catching up on my mail...
>
> On 03-Nov-99, [EMAIL PROTECTED] wrote:
>
> >
> >        Howdy Allen:
> >
> >> Hi Rebols,
> >>
> >> Has anyone got an  i-date  to REBOL  date formatter? Or  is
> >> there one  built in I   haven't found.  I  actually thought
> >> that to-date might work...but alas no luck
> >
> >>> to-date skip to-idate now 5
> >    == 3-Nov-1999/21:37:42-8:00
>
> What?  That's the same as what 'now gives.  What was the point of to-date
> skip to-idate now 5, besides alot more typing?  What is idate anyway?  I
> missed that if it was explained in the previous mail.

try to use 'source function from time to time ...

->> source to-idate
to-idate: func [
    "Returns a standard Internet date string."
    date [date!]
    /local str
][
    str: form date/zone
    remove find str ":"
    if (first str) <> #"-" [insert str #"+"]
    if (length? str) <= 4 [insert next str #"0"]
    head insert str reform [
        pick ["Mon," "Tue," "Wed," "Thu," "Fri," "Sat," "Sun,"] date/weekday
date/day
        pick [
            "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov"
"Dec"
        ] date/month date/year date/time ""
    ]
]
->>

Regards,

-pekr-


>
>
> Elliott

Reply via email to