[Zope] Sort by content creation date

Andreas Jung lists@andreas-jung.com
Wed, 21 Aug 2002 12:27:47 +0200


tricky....have a look at the 'sequence' module. this module
provides a sort() method that can be customized by passing
a customized comparision function. in general the comparision
function has to args and return -1, 0 or -1 depending on the
comparision of both args. inside your function you need to extract
the value for DD and return -1, 0 or -1 depending on the comparison.

-aj
----- Original Message -----
From: "Patrick Romano" <patrickromano@hotmail.com>
To: <zope@zope.org>
Sent: Wednesday, August 21, 2002 12:24
Subject: [Zope] Sort by content creation date


> I want to sort a certain number of Kubes by their content creation date,
> which is   DD/MM/YY,
> but if I do it like that
>
> <dtml-in expr="news.objectValues('Kube')"  sort="content_creation_date">
>
> the Kubes are sorted by date starting from the left : sorted by DD first.
> How can I achieve to have it soted by YY without changing the order of my
> date (DD/MM/YY)?
>
> Thanks,
> Patrick
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>