Rebol Programming/to-idate

= USAGE: = TO-IDATE date

= DESCRIPTION: = Returns a standard Internet date string.

TO-IDATE is a function value. = ARGUMENTS =
 * date -- (Type: date)

= SOURCE CODE = 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"] 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 to-itime any [date/time 0:00] str ] ]