跳轉到內容

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
]
華夏公益教科書