Created
September 13, 2013 15:46
-
-
Save dkordik/6552418 to your computer and use it in GitHub Desktop.
w3schools to/get date methods, by example... which it should be in the first place. JS console to the rescue!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anchors=document.querySelectorAll("table a"); | |
for (i=0; i < anchors.length; i++) { | |
if (anchors[i].innerText.match(/(to|get).*\(\)/) ) { | |
var method = anchors[i].innerHTML; | |
method=method.substring(0, method.length-2); | |
console.log(method, " -- ", new Date()[method]()); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment