[pmwiki-users] Conditional Directive based on time

Neil Herber nospam at eton.ca
Wed Oct 12 09:33:26 CDT 2005


At 2005-10-12  08:53 AM -0500, Patrick R. Michaud is rumored to have said:
> >       (:if date 20051206- :)          display on and after Dec 6
> >       (:if date -20051210 :)          display before and on Dec 10
> >       (:if date 20051206-20051210 :)  display Dec 6,7,8,9, and 10
>
>Keeping this theme, then ("through" means "including" here):
>
>     (:if date 200501-200503 :)      display from 2005.01.01 through 
> 2005.03.31
>
>     (:if date 20051006-2006 :)      display from 2005.10.06 through 
> 2006.12.31
>     (:if date 20051006-200601 :)    display from 2006.10.06 through 
> 2006.01.31
>     (:if date 20051006-20060101 :)  display from 2006.10.06 through 
> 2006.01.01
>     (:if date 20051006-2005 :)      display from 2005.10.06 through 
> 2005.12.31

Some truncated dates appear ambiguous.  For example, I could interpret:
(:if date 20051006-2006 :)
as either 2005.10.06 to 2006.01.01  -or-   2005.10.06 to 2006.12.31

And it somehow looks counter-intuitive that a shorter string like:
(:if date 20051006-2006 :)  specifies a *longer* period than (:if 
date 20051006-20060202 :)

I know somebody can learn the rules, but why not avoid many of the 
rules by always requiring a complete date?

<nitpicking>
I suspect that:
>     (:if date 20051006-200601 :)    display from 2006.10.06 through 
> 2006.01.31
>     (:if date 20051006-20060101 :)  display from 2006.10.06 through 
> 2006.01.01

should really be:
     (:if date 20051006-200601 :)    display from 2005.10.06 through 2006.01.31
     (:if date 20051006-20060101 :)  display from 2005.10.06 through 2006.01.01
<nitpicking/>


Neil

Neil Herber
Corporate info at http://www.eton.ca/
Eton Systems, 15 Pinepoint Drive, Nepean, ON, Canada K2H 6B1
Tel: (613) 829-4668 





More information about the pmwiki-users mailing list