[pmwiki-users] experimental - pagelist conditionals
christian.ridderstrom at gmail.com
christian.ridderstrom at gmail.com
Wed May 2 11:35:16 CDT 2007
On Wed, 2 May 2007, Patrick R. Michaud wrote:
> On Wed, May 02, 2007 at 10:43:58AM +0200, Roman wrote:
>>> (:if date 2007-05-01..2007-05-31 {*$Name} :)
>>
>> I assume that each parameter accepts any expression. For example, if
>> page names are in form "News-yyyy-mm-dd", the following condition
>> should work. Am I right?
>>
>> (:if date 2007-05-01..2007-05-31 {(substr {*$Name} 5)} :)
>
> Yes... and it's not necessary to use the {(substr ...)} .
> The date converter will search any string for the first
> date-looking-thing that it finds (see below). So, even
> for a page named "News-yyyy-mm-dd" one can do
>
> (:if date 2007-05-01..2007-05-31 {*$Name}:)
I believe this gives an affirmative answer to my question if
"Meeting2007-05-31" would match the above. Nice :-)
> The date converter understands the following formats:
>
> - A string starting with '@' and a sequence of digits is treated
> as a unix timestamp
Hmm... I'd assumed the source of the string to be a page name (I wasn't
thinking about page variables). Anyway, can a page name contain a '@'?
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list