[pmwiki-users] Conditional Directive based on time - standards

Jonathan Scott Duff duff at pobox.com
Thu Oct 13 10:57:06 CDT 2005


On Thu, Oct 13, 2005 at 10:04:33AM -0500, Patrick R. Michaud wrote:
> I'm still on the fence about truncated dates and allowing time
> specifiers.  It's not an implementation problem, but enough people
> have said that they'd like dates-always-in-one-format that
> I'm reluctant to include the extended forms by default.  Perhaps it 
> will be an option for the wikiadmin, or maybe a different (:if:) 
> condition name that says the extra date/time formats are okay.

Making it an option for the WikiAdmin seems best to me. That way the
syntax stays the same (always "date") and you can poll people after the
feature has been put to use to see exactly how many people have the
"extended dates" option turned on.

>     (:if date_t 200510..2006:)         # 2005-Oct-01 through 2006-Dec-31
>     (:if date_t ..2005-10-13T12:00 :)   # until noon on 2005-Oct-13

There's still the question of time zones. If I'm in California but my
web hosting company is in New Jersey, my idea of when noon is will be
quite different from when my webserver thinks noon is. So, the WikiAdmin
(at least) needs to be able to specify the default timezone for the
date/time based conditionals.

Plus people in different time zones may be using the same wiki so that
they each have a different expectation of when time-based conditional
markup should appear. This might be rare enough though that it's not
really a problem though.

As a slight aside, it would be nice to have a time only conditional
such that you could do things like this:

	(:if time 1200..1800 :)		

display every day but only between the hours of 12:00pm and 6:00pm

-Scott
-- 
Jonathan Scott Duff
duff at pobox.com




More information about the pmwiki-users mailing list