I have an array of dates e.g.
Fri Jan 28 10:13:19 UTC 2011
Thu Jan 27 16:57:59 UTC 2011
Thu Jan 27 16:41:21 UTC 2011
Wed Jan 26 09:20:48 UTC 2011
Mon Jan 24 16:19:48 UTC 2011
Fri Jan 21 11:45:34 UTC 2011
Fri Jan 21 11:42:19 UTC 2011
How can I group them so the output is as hash with the count of items each day:
Friday 28 => 1
Thursday 27 => 2
Wednesday 26 => 1
Monday 24 => 1
Friday 21 => 2
%A
is the full weekday name and%d
is the day of the monthI can't test this currently but I think it will work.
Or, to put kurumi's solution more verbosely and using Jimmy's strftime:
give us:
OK?