< Rebol Programming
USAGE:
PARSE-HEADER-DATE data
DESCRIPTION:
(undocumented)
PARSE-HEADER-DATE is a function value.
ARGUMENTS:
- data -- (Type: string none)
SOURCE CODE
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
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.