Created
December 24, 2017 16:37
-
-
Save gosub/ef6b57ae372e028dd7d59c5a74970918 to your computer and use it in GitHub Desktop.
Hacker News 3 years ago
This file contains 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
var t = new Date(); | |
var y = t.getFullYear(); | |
var m = t.getMonth(); | |
var d = t.getDate(); | |
var p1 = (new Date(y-3, m, d, 0,0,0,0).getTime() + "").slice(0,-3); | |
var p2 = (new Date(y-3, m, d, 23,59,0,0).getTime() + "").slice(0, -3); | |
var u = "https://hn.algolia.com/?query=&sort=byPopularity&prefix&page=0&dateRange=custom&type=story&dateStart=" + p1 + "&dateEnd="+ p2; | |
window.location.href=u; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment