This is a Views / Date request.

I am trying to create a view that shows nodes created last week. Specifically at any point in the current week I want to show nodes created Mon-Fri the previous week (user visits site on January 3rd, the view would display all nodes created between December 24th to the 28th).

Using something like '-7 days' does not work as it would limit the results. Ie. if user visits site on Wednesday, the last week's content would show only last Wednesday and not the entire Mon-Fri range.

I have created a view that shows nodes created this week by using date range from 'last sunday' to 'this saturday', is there a way that could be offset back one week?

Thanks for any pointers!

Comments

merlinofchaos’s picture

Status: Active » Fixed

To do that you'd probably need to use hook_views_pre_build() and manually switch the numbers around, as your needs are simply more complex than you can do through the UI. With that, you can calculate dates to your heart's content.

Status: Fixed » Closed (fixed)

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