Show the date with the smallest order of magnitude of difference from now.
closest
calendar
| # @@@@@@@ @@@@@@@ @@@@@@ @@@@@@@@@@ @@@@@@@ @@@@@@@ | |
| # @@! @@@ @@! @@@ @@! @@@ @@! @@! @@! @@! @@@ @!! | |
| # @!@@!@! @!@!!@! @!@ !@! @!! !!@ @!@ @!@@!@! @!! | |
| # !!: !!: :!! !!: !!! !!: !!: !!: !!: | |
| # : : : : : :. : : : : : | |
| RESET="\[\033[0;37;00m\]" | |
| GREEN="\[\e[0;32m\]" |
| function x(total, values, place) { | |
| var output = i = 0, | |
| f = function(i){ | |
| output += (i == total); | |
| }; | |
| while (place = values[i++]) { | |
| (function(b,c){ | |
| f = function(a, i){ |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Tim Wood <timwoodcreates.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| http://kangax.github.com/es5-compat-table/ | |
| http://stackoverflow.com/questions/6799559/javascript-reserved-keywords | |
| http://stackoverflow.com/questions/5306315/browser-support-for-using-a-reserved-word-as-a-property-name-in-javascript | |
| http://stackoverflow.com/questions/4298594/javascript-keywords-in-hash-keys |
| { | |
| "collectables": [{ | |
| "py": 349, | |
| "px": 599, | |
| "id": 281 | |
| }], | |
| "obstacles": [{ | |
| "py": 426, | |
| "sx": 198, | |
| "f": 2, |
| var fs = require("fs"); | |
| var wrapReplace = /}\);\s*test\((["a-zA-Z ]+), ?(\d+), ?function\(\)\s*{/g; | |
| var replace = " test.done();\n },\n\n $1 : function(test) {\n test.expect($2);"; | |
| var erg = /}\);\s*$/g; | |
| var es = 'test.done();\n }\n};'; | |
| var frg = /\s*module\((["a-zA-Z:\- ]+)\);\s*test\((["a-zA-Z ]+), ?(\d+), ?function\(\)\s*{/g; | |
| var fst = "\n\nexports[$1] = {\n $2 : function(test) {\n test.expect($3);"; |
| (function(){ | |
| var oldcal = moment.calendar; | |
| var newcal = { | |
| sameDay : '[Today]', | |
| nextDay : '[Tomorrow]', | |
| nextWeek : 'dddd', | |
| lastDay : '[Yesterday]', | |
| lastWeek : '[last] dddd', | |
| sameElse : 'L' | |
| }; |
| var now = new Date(); | |
| var birth = new Date(1986, 6, 10); // remember that we're using zero indexed months... | |
| var yearDiff = now.getFullYear() - birth.getFullYear(); | |
| var monthDiff = now.getMonth() - birth.getMonth(); | |
| var dayDiff = now.getDate() - birth.getDate(); | |
| var hourDiff = now.getHours() - birth.getHours(); | |
| var minuteDiff = now.getMinutes() - birth.getMinutes(); | |
| var secondDiff = now.getSeconds() - birth.getSeconds(); | |
| var millisecondDiff = now.getMilliseconds() - birth.getMilliseconds(); |