[pmwiki-users] New {$$ } and {( )} markups [Was: Can any of the form recipes do this?]
Patrick R. Michaud
pmichaud at pobox.com
Tue Apr 3 10:36:44 CDT 2007
On Tue, Apr 03, 2007 at 04:01:16PM +0100, Hans wrote:
>
> Having {(date ..)} and {(time ...)} markup will mean it can be used in
> pages, like PageVariables?
Yes.
> That will make a lot of specialised date
> and time PVs unnecessary. But it would be good to allow some
> addition/subtraction math for setting future/past time events.
Perhaps the general form is:
{(strftime "fmt" "time")}
with {(date ...)} being a shortcut for {(strftime "%Y-%m-%d" ...)}
Then we have:
{(date)} # 2007-04-03
{(date yesterday)} # 2007-04-02
{(date "-7 days")} # 2007-03-27
{(date "March 13"}) # 2007-03-13
The "time" arguments would be any ISO-8601 format, with a fallback to
PHP's strtotime() function for anything that isn't in ISO-8601.
What do we want {(time)} to output?
Pm
More information about the pmwiki-users
mailing list