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

thomas23@drupal.org’s picture

subscribe 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.

manop’s picture

The 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.

tobiberlin’s picture

Subscribing... is there no way to list nodes just of the current day or month???

dawehner’s picture

What about between -1 day / + 1 day

$view = new view;
$view->name = 'test';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Filter: Node: Post date */
$handler->display->display_options['filters']['created']['id'] = 'created';
$handler->display->display_options['filters']['created']['table'] = 'node';
$handler->display->display_options['filters']['created']['field'] = 'created';
$handler->display->display_options['filters']['created']['operator'] = 'between';
$handler->display->display_options['filters']['created']['value']['min'] = '-1 day';
$handler->display->display_options['filters']['created']['value']['max'] = '+1 day';
tobiberlin’s picture

Thank 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".

eriktoyra’s picture

Subscribing. 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?

tobiberlin’s picture

Hi,

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

dawehner’s picture

Status: Active » Fixed

So this is fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

held69’s picture

Status: Closed (fixed) » Active

With 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

dawehner’s picture

No 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.

held69’s picture

Status: Active » Closed (fixed)

Thanks

janis_lv’s picture

thanks, this solved mine problem :)