aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-08-31 13:12:03 +0200
committerJonas Smedegaard <dr@jones.dk>2024-09-01 09:18:49 +0200
commitf4feb72d4a9ccb02d4b0e750de47ae5f60e49fc1 (patch)
tree10ba94d221ea16a5203ccb7759bd49204d878893
parent0f9cda3eb8afd89a9a2470d9a4c19a5c1c69b092 (diff)
fix sort by end date (not only start date)
-rw-r--r--lib/Object/Groupware/Calendar.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/Groupware/Calendar.pm b/lib/Object/Groupware/Calendar.pm
index 386a749..3d46032 100644
--- a/lib/Object/Groupware/Calendar.pm
+++ b/lib/Object/Groupware/Calendar.pm
@@ -49,7 +49,7 @@ method events ( $set = undef, $period = undef )
)
} sort {
$a->start->compare( $b->start )
- || $a->start->compare( $b->start )
+ || $a->end ? $a->end->compare( $b->end ) : 0
|| $a->summary cmp $b->summary
} $data->events( $set || (), $period || () );