Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

date-val

   1  
   2  date-val: func [
   3  	"Do everything possible to convert a value to a date."
   4      date
   5      /def-day d [integer! word!] "Default day for mm/yyyy format. Number or 'last"
   6      /local res
   7  ] [
   8      if any-string? date [trim date]
   9      any [
  10          all [date? date  date]
  11          parse-simple-date/def-day date any [d 1]
  12          attempt [to date! date]
  13      ]
  14  ]
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS