[pmwiki-users] Conditional Directive based on time

Waylan Limberg waylan at gmail.com
Wed Oct 12 13:33:53 CDT 2005


On 10/12/05, Jonathan Scott Duff <duff at pobox.com> wrote:
> On Wed, Oct 12, 2005 at 06:04:49PM +0100, Hans wrote:
> > Wednesday, October 12, 2005, 5:47:02 PM, Jonathan wrote:
> > > Indeed. Neat tricks are to be avoided if clarity is sacrificed.
> >
> > you mean: ...if clarity is not to be sacrificed?
>
> if (clarity sacrificed) avoid neat tricks
>
> :-)
>
> > But "date today" is pretty clear to me: today's date.
>
> Sure ... how surprised will authors be that where they've written
>
>         (:if date today :)
>
> is transmogrified into
>
>         (:if date 20051012 :)
>
> upon saving the page?
>
> I'm generally against changing the contents of pages in this manner if
> it can be helped.
>
And then you have the whole issue of server's time verses client's
time. Seeing this is done server side, the code would have to use the
current date of the server. But what if the user is half way around
the world? Depending on the time of day, the date could be transformed
to either the day before or after what the user expects. Seeing that
physical location is generally transparent, I would suggest sticking
to actual dates (numbers) rather than substituting words.


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list