[pmwiki-users] Conditional Directive based on time
Jonathan Scott Duff
duff at pobox.com
Wed Oct 12 08:42:13 CDT 2005
On Wed, Oct 12, 2005 at 08:01:48AM -0500, Patrick R. Michaud wrote:
> Well, I'm thinking that I'd like the items below to remain somewhat
> consistent:
>
> (:if date 20051206-20051210 :)
> (:if date -20051210 :)
>
> So, if the first one includes December 10th (i.e., through 23:59:59),
> then the second one should also.
Indeed. I think most people have an easier time with including the
ending date than otherwise, so I think the semantics should be
(: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
If people really want before/after we could do something like this:
(:if date after 20051206 :) display starting on Dec 7
(:if date before 20051210 :) display up to and including Dec 9
BTW, I notice that you consistently put a space at the end of your
directives--is that purely for readability?
-Scott
--
Jonathan Scott Duff
duff at pobox.com
More information about the pmwiki-users
mailing list