Skip to content

Instantly share code, notes, and snippets.

@iArnold
Created May 9, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iArnold/3a32f7e1b53cab37fa398f49076fccdf to your computer and use it in GitHub Desktop.
Save iArnold/3a32f7e1b53cab37fa398f49076fccdf to your computer and use it in GitHub Desktop.
Red date retrieve
get-date: function [
"Get date from unixtimestamp.com"
return: [string!]
/local
page
datestring [string!]
datearray
][
page: read http://www.unixtimestamp.com/index.php
get-today-rule: [ thru {seconds since Jan 01 1970. (UTC)} thru {<h3 class="text-danger">} copy datestring to " @ " to end]
parse page get-today-rule
datearray: split datestring "/"
rejoin [datearray/3 "-" datearray/1 "-" datearray/2]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment