On Sat, Dec 12, 2009 at 9:42 PM, Prkos prkos@prkos.hr wrote:
I need to filter nodes created in the current quarter, where starting and ending dates of each quarter are customly configured (but always the same within a year.)
Do I need to make a custom query or can it be done with arguments or with some other more or less automated way?
I see a couple ways to do this.
1. Add a cck field to your node with the quarter. The user has to select the correct quarter from a list of acceptable values. This is the absolute simplest way I can think of doing this.
2. Use a Computed Field[1]. You should be able to configure it to set the correct quarter based on some date field (either a CCK date, or one of the nodes dates). I've never used this module so YMMV. This looks like it'd be the cleanest solution.
3. Use a in between filter on your date field in views. Make a custom module with a hook_form_alter to hide the min and max fields, add a dropdown with the quarter and write some javascript to set the min and max.