From e6180e0baec0634bed144b788027b724c6b2a929 Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 19 Aug 2021 12:16:47 +0530 Subject: Sort Yearly report by month --- lib/Taurus/CLI.rakumod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Taurus/CLI.rakumod b/lib/Taurus/CLI.rakumod index 560ef75..ba98381 100644 --- a/lib/Taurus/CLI.rakumod +++ b/lib/Taurus/CLI.rakumod @@ -70,7 +70,7 @@ multi sub MAIN ( $p0.put: ""; # First list Contacts, then sorted phone numbers. for @logs.race.map(*.[1]).unique.sort({%contacts{$_} // "Z", $_}) { - $p0.put: "- " ~ $_ ~ " {%contacts{$_} // ''}", :meta(:number($_)); + $p0.put: "- " ~ $_ ~ " {%contacts{$_} // ''}", :meta(:number($_)); } $p1.clear; @@ -91,7 +91,7 @@ multi sub MAIN ( with @logs.grep(*.[3].year eqv $year) { print-basic-stats($p1, $_); $p1.put: ""; - for .map(*.[3].month).unique -> $month { + for .map(*.[3].month).unique.sort -> $month { $p1.put: "%-*s %s".sprintf($fmt, @month-name[$month] ~ ":", seconds-to-str(.grep(*.[3].month eqv $month).map(*.[4]).sum)); } -- cgit 1.4.1-2-gfad0