According to the documentation on https://stackoverflow.com/help/searching there is no bookmark-able shorthand to search for questions created (or last active) today. To view questions created yesterday I can query created:1d
, but to search for questions created today I must type created:2015-09-16
. Is there a shorthand that is not in the documentation? I tried created:0d
, but that was not valid. The closest bookmark-able link I can use is created:1d..
, but that includes questions created yesterday.
-
25.. sort on "newest"?– JongwareCommented Sep 16, 2015 at 21:54
-
13Sorting and searching are not the same thing. For instance, if i wanted to see the question posted today that has the most votes, i would have to search "created:2015-09-16 is:q" and then sort by votes. Ideally I would like to have finer tuned search ability (search for questions that are 2-4 hours old,etc) but that would be an entirely new feature. The ability to search for just today's questions already exists,but it would just be nice if a shorthand existed for this as I would be able to bookmark the query and not have to edit it every day.– ScottCommented Sep 17, 2015 at 13:20
2 Answers
More useful, and more consistent with the existing created:
searches, would be to add support for hours.
Then your search could be written as created:24h
, and support for searching in the last 3 hours, or the last 36 hours, which are not possible under your proposal, would come for free.
For what you said in your comment (between 2 and 4 hours old), you could then use negation: created:4h -created:2h
or use a range created:2h..4h
This also suggests a workaround to get today's posts: negate the set of posts up to and including yesterday: -created:..1d
Unfortunately, the negation operator isn't respected, and this gives the same set as created:..1d
.
-
I really like this idea and would love more fine tuned ability to search for hours old posts. The only reason I didn't include it in my feature request was because I didn't want to ask for too much. The reality seems to be (at least in my experience) most posts die about an hour or two after they are asked. Making them easier to search for could help extend the life of some questions.– ScottCommented Sep 18, 2015 at 20:29
Copy and paste this as the bookmark. Tested using Firefox 40
javascript:(function(){Date.prototype.sodate = function(){var yyyy=this.getFullYear().toString();var mm=(this.getMonth()+1).toString();var dd=this.getDate().toString();return yyyy+"-"+(mm[1]?mm:"0"+mm[0])+'-'+(dd[1]?dd:"0"+dd[0]);};var today=new Date(Date.now());window.location.assign("http://stackoverflow.com/search?q=created%3A"+today.sodate());})()
Formatted:
javascript:(
function(){
Date.prototype.sodate = function(){
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth()+1).toString();
var dd=this.getDate().toString();
return yyyy + "-" + (mm[1]?mm:"0"+mm[0]) + '-' + (dd[1]?dd:"0"+dd[0]);
};
var today=new Date(Date.now());
window.location.assign("http://stackoverflow.com/search?q=created%3A"
+today.sodate());})()
Edited to add the is:q
version:
javascript:(function(){Date.prototype.sodate = function(){var yyyy=this.getFullYear().toString();var mm=(this.getMonth()+1).toString();var dd=this.getDate().toString();return yyyy+"-"+(mm[1]?mm:"0"+mm[0])+'-'+(dd[1]?dd:"0"+dd[0]);};var today=new Date(Date.now());window.location.assign("http://stackoverflow.com/search?q=is%3Aq%20created%3A"+today.sodate());})()
-
Agreed. This is a very creative solution, and will work as a workaround, but having the feature implemented would be nice in the long run.– ScottCommented Sep 18, 2015 at 20:11
-
1@Scott - I agree that this seems like an oversight in the search parameters, but I also don't see a change coming any time soon.– theBCommented Sep 18, 2015 at 20:20