Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-rc1
Component:
node data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2008 at 19:18 UTC
Updated:
30 May 2010 at 20:03 UTC
Hello!
Is it possible to add
in Configure filter Node: Post date
a filter for
current year as mktime (0,0,0,0,0,date('Y')),
current month as mktime (0,0,0,date('n'),0,date('Y')),
current day as mktime (0,0,0,0,date('j),date('Y')).
To filter Nodes on the relevance!!!
Now have to write specific dates "Is between": 2008 ---- 2009-0-0 0:0:0 and in 2009 to rewrite 2009----2010-0-0 0:0:0
It would be easier to write once, for example: 'Y' or 'M', or 'D'
Or already have such an opportunity?
Thank you very much!
Sorry for my English.
Comments
Comment #1
thomas23@drupal.org commentedsubscribe since I'll need this feature, too (filter nodes from same month as current).
Update: Found out how to at least show only stuff from within the last month which, by the way, is not very intuitiv I find. Using the offset feature and "is between" "Min" has to be the "larger value" (which of course computest to the earlies, i.e. actually smalest date value) and "Max" would be the shortest period away from current date, i.e. from an absolute perspective it's the biggest date value. But that's not how users look on it I would assume.
Anyway, this way I only get nodes from within this day range but not only those from the current month/day/hour/year. Hence it would be really greate to get the functionality to show only those nodes (if I'm missing something and it's possible already I'd really aprechiate help here).
Cheers.
Comment #2
manop commentedThe way I did for filtering in the last month was that
Using
* filtes= node: post date,
* operators= is greater than,
* offset value= -1 month
Then the value filters for everything less than one month.
Comment #3
tobiberlinSubscribing... is there no way to list nodes just of the current day or month???
Comment #4
dawehnerWhat about between -1 day / + 1 day
Comment #5
tobiberlinThank you for your post, but unfortunately this does not meet my needs... when a user writes a node at 5pm for example and visits again next day at 11am my project he founds his node from yesterday in the block "Nodes from today".
Comment #6
eriktoyra commentedSubscribing. Need the same thing. I would like to filter on nodes published today, on the todays date and not in the last 24h. Would it be possible using arguments?
Comment #7
tobiberlinHi,
I actually found a sollution in another forum:
Argument: Node -> Creation date
Standard argument: current date
As I use a German translation I hope that I used the words found on the Views UI or you can imagine which configurations I mean :-)
Greez,
Tobias
Comment #8
dawehnerSo this is fixed.
Comment #10
held69 commentedWith succes i have applied the argument configuration mentioned above.
However i would also like to have something as an exposed filter where users themselves can filter the displayed nodes with:
-current day
-current week
I havent been able to create this with the argument setting.
Is this possible? (i am not a coder)
If not, then current day,(week or month)still would be a great feature to have as a filter.
Thanks
Comment #11
dawehnerNo its not, if you are not a coder.
If you are a coder, you can use hook_form_alter or you can change the filter handler.
Comment #12
held69 commentedThanks
Comment #13
janis_lv commentedthanks, this solved mine problem :)