Hello,

Here is a patch that enables me to filter a view by created month and created year. It works the same as and is consistent with the 'Node: Created Time' filter.

With this patch, I create a block that lists the node titles for the current month by using a "is equal to now" filter; and another block that produces a monthly archive starting from the previous month using a "is less than or equals to now - 1" filter.

Here are in fact two patches:
- one against views-5.x-1.6
- one against my other patch http://drupal.org/node/199366

cheers,
guardian

Comments

najibx’s picture

Hello,

It seems this patches never got committed until now.

As of the first patch, it does give me a filter 'Node: Created Month' and 'Node: Created Year' filters.
However, I am not sure, it got is working.

i.e I choose and expose 'Node: Created Year'. I choose "Is equal to". When I simply type "2008", it doesnot not list the nodes properly.
It gave me this URL : myViews?filter0=2008

In addition, an advise how I can add pulldown list of years (maybe snippets) of this filter ?

Thank you.

sun’s picture

Status: Needs review » Needs work

I guess this means PNW

esmerel’s picture

Status: Needs work » Closed (won't fix)

No changes are being made to the 1.x line at this point.

lexa.mihu’s picture

Version: 5.x-1.6 » 6.x-3.x-dev

does this patches exists for views 6.x-3.x-dev ? i really need node created year.