<div dir="ltr">Possibly <div><a href="http://www.pmwiki.org/wiki/Cookbook/MoreCustomPageVariables">http://www.pmwiki.org/wiki/Cookbook/MoreCustomPageVariables</a><br></div><div>may help too</div><div><br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On 4 September 2014 21:10, Stef <span dir="ltr"><<a href="mailto:stefct4@gmail.com" target="_blank">stefct4@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">> On 4 September 2014 17:14, <a href="mailto:kirpi@kirpi.it">kirpi@kirpi.it</a> <<a href="mailto:kirpi@kirpi.it">kirpi@kirpi.it</a>> wrote:<br>
><br>
>> > <a href="http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions#ftime" target="_blank">http://www.pmwiki.org/wiki/PmWiki/MarkupExpressions#ftime</a><br>
>> > provides the information you need.<br>
>> > In particular see the information. and importantly the link, about the<br>
>> > "when" parameter.<br>
>><br>
>> Thank you Simon.<br>
>> I am not sure I understand what you mean :-)<br>
>> There is a link pointing to a strange name (strtotime) in a php<br>
>> website. You mean I should use php instead of javascript, perhaps? Ok,<br>
>> I will try...<br>
<br>
</div>To some of my CopyPasteCalendars I've added "Last Month/Next Month" buttons.<br>
To that end, I've added the following lines of PHP to my config.php:<br>
<br>
$MarkupExpr['nextmonth'] = 'nextmonth ($args[0])';<br>
$MarkupExpr['lastmonth'] = 'lastmonth ($args[0])';<br>
<br>
function nextmonth ($argdate)<br>
        {<br>
        $arg0 = substr ($argdate,0,4);<br>
        $arg1 = substr ($argdate,4,2);<br>
        $arg1 = $arg1 +1;<br>
        if ($arg1>12)<br>
                {<br>
                $arg0 = $arg0 + 1;<br>
                $arg1 = 1;<br>
                }<br>
        $arg1 = sprintf('%02d', $arg1);<br>
        return $arg0.$arg1;<br>
        }<br>
<br>
function lastmonth ($argdate)<br>
        {<br>
        $arg0 = substr ($argdate,0,4);<br>
        $arg1 = substr ($argdate,4,2);<br>
<br>
        $arg1 = $arg1 -1;<br>
        if ($arg1<1)<br>
                {<br>
                $arg0 = $arg0 - 1;<br>
                $arg1 = 12;<br>
                }<br>
        $arg1 = sprintf('%02d', $arg1);<br>
        return $arg0.$arg1;<br>
        }<br>
<br>
PmWiki Markup:<br>
<br>
'''[+[[{*$FullName}?ListDate={(lastmonth<br>
"{$$ListDate}")}?action=browse|«««]] {(ftime fmt="%B %Y" when=(substr<br>
{$$ListDate} 0 6)01)} [[{*$FullName}?ListDate={(nextmonth<br>
"{$$ListDate}")}?action=browse|»»»]]+]'''<br>
<br>
instead of:<br>
'''[+{(ftime fmt="%B %Y" when=(substr {$$ListDate} 0 6)01)}+]'''<br>
<br>
Maybe you could modify this to suit your needs...<br>
<br>
--StefCT<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a>
</div>