[pmwiki-users] Re: Conditional Directive based on time - standards
Patrick R. Michaud
pmichaud at pobox.com
Thu Oct 13 13:12:14 CDT 2005
On Thu, Oct 13, 2005 at 07:31:45PM +0200, chr at home.se wrote:
> On Thu, 13 Oct 2005, Neil Herber wrote:
>
> I haven't really followed this thread, but how about
>
> (:if 20051014 < date < 20051020:)
> (:if 20051014 <= date <= 20051020:)
>
> where instead of 'date' we could alternatively use 'now' or 'time'?
This doesn't follow the syntax of the (:if:) markup -- the
thing immediately following the "(:if " has to be the name of
the condition. Of course, one could do
(:if date <20051020 :) strictly before Oct 20
(:if date >20051015 :) strictly after Oct 15
(:if date <=20051020 :) on or before Oct 20
(:if date >=20051015 :) on or after Oct 15
(:if date >=20051015 <=20051020:) Oct 15 through Oct 20
(:if date >=20051015 <20051020:) Oct 15 through Oct 19
but I think non-math-oriented folks may frequently forget
about the ">=" and "<=" forms when writing dates and thus end up
with things starting a day later or ending a day earlier than intended.
Pm
More information about the pmwiki-users
mailing list