Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/parse-header-date

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

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 ]