[pmwiki-users] Capture all pages within date range.
Patrick R. Michaud
pmichaud at pobox.com
Tue May 22 12:41:02 CDT 2007
On Tue, May 22, 2007 at 01:07:26PM -0400, Ben Wilson wrote:
> On 5/22/07, Ben Wilson <dausha at gmail.com> wrote:
> > Does anybody have a suggestion on how to capture a pagelist items
> > within a date range? For example, I want to list all journal pages
> > occurring this week (by page name "Journal-2007-05-21").
>
> I should clarify that I'm looking for a dynamic answer, so I can say
> something like:
>
> (:pagelist occurring=2007W21:)
(:pagelist if="date monday-7days..monday {=$Name}" :)
If this were executed today (2007-05-22, tuesday) then this
would list all of the pages from 2007-05-21 through 2007-05-28
(inclusive).
Unfortunately, on Monday 2007-05-28 itself it would end up
showing the pages of the previous week instead of the next week,
which is probably not what you want. I haven't thought of a clean
way around this yet.
I can see about adding the ISO week notation if you like.
Then the pagelist command would be
(:pagelist if="date {(ftime %GW%V)} {=$Name}" :)
which would get all pages that have dates in the current week
(where a new "current week" starts each Monday).
We can also add a "thisweek" shortcut for the above, so that
it becomes
(:pagelist if="date thisweek {=$Name}" :)
Pm
More information about the pmwiki-users
mailing list