[pmwiki-users] Capture all pages within date range.

Patrick R. Michaud pmichaud at pobox.com
Tue May 22 14:10:06 CDT 2007


On Tue, May 22, 2007 at 02:59:12PM -0400, Ben Wilson wrote:
> >On 5/22/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >> > Hmm. Is this available now? I upgraded the site using subversion
> >> > (Exported revision 2062), but the above does not work. 
> >>
> >> The exact code I have in the local/Test.NameISOWeek.php file on
> >> pmwiki.org is:
> >>
> >>   <?php
> >>     $FmtPV['$NameISOWeek'] =
> >>       "strftime('%GW%V', array_shift(DRange(\$name)))";
> >>
> >
> >(:pagelist if="date {$NameISOWeek} {=$Name}" :)
> 
> (:pagelist $NameISOWeek={Summary-2007-05-19$NameISOWeek} :)
> 
> The above works, but not (:pagelist if="date {$NameISOWeek} {=$Name}"
> :). I'm assuming there is nothing I must do to activate the "if"
> feature in pagelist.

The "if=" feature is in the trunk, but not the ability for the
'date' conditional to parse ISO week dates.  That's what I meant
(but wasn't explicit) when saying

    The ability to parse a name like Summary-2007W21 as a date is 
    dependent on me adding the code to the date parsing routine 
    that can understand ISO week specifications.

Using $NameISOWeek={*$NameISOWeek} will end up being
far more efficient than the if= conditional anyway, so I
strongly recommend that approach (which doesn't depend on
being able to parse 2007W21 as a date, since it's just a
simple string comparison).

Pm



More information about the pmwiki-users mailing list