Rebol 编程/to-idate
外观
< Rebol 编程
TO-IDATE date
返回标准互联网日期字符串。
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"] 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 ] ]