跳转到内容

Rebol 编程/parse-header-date

来自维基教科书,开放的书籍,开放的世界
PARSE-HEADER-DATE data 

(未记录)


PARSE-HEADER-DATE 是一个函数值。

  • data -- (类型:字符串 none)

源代码

[编辑 | 编辑源代码]
parse-header-date: func [
    data [string! none!] /local despace here date count
][
    if none? data [return none] 
    count: 0 
    despace: [to " " here: (
            change here "/" 
            either count = 3 [if #"-" <> second here [insert next here #"+"]] 
            [count: count + 1]
        ) despace | none] 
    parse/all data [opt [thru "," thru " "] date: despace] 
    if error? data: try [to-date date] [data: now] 
    data
]
华夏公益教科书