Last modified on 31 October 2012, at 16:39

REBOL Programming/parse-header-date

USAGE:Edit

PARSE-HEADER-DATE data 

DESCRIPTION:Edit

(undocumented)


PARSE-HEADER-DATE is a function value.

ARGUMENTS:Edit

  • data -- (Type: string none)

SOURCE CODEEdit

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
]