[pmwiki-users] pagelist sort by date not time
Patrick R. Michaud
pmichaud at pobox.com
Wed Sep 27 01:16:58 CDT 2006
On Wed, Sep 27, 2006 at 01:54:08AM -0400, Henrik Bechmann wrote:
> All,
>
> I want to sort some pagelist output by
>
> order=-time,group,name
>
> but only by date (not taking into account the time of day).
>
> The logical equivalent would be:
>
> order=-date,group,name
>
> How would I do this?
There's not an easy way to do it in 2.1.x.
In 2.2.0-beta5, one can define a custom page variable for date
and then sort based on that:
$FmtPV['$Date'] = 'strftime("%Y-%m-%d", $page["time"])';
order=-$Date,group,name
See, for example, http://www.pmwiki.org/wiki/Test/RecentChangesByDate .
Pm
More information about the pmwiki-users
mailing list