Created
November 2, 2011 13:22
-
-
Save justincampbell/1333609 to your computer and use it in GitHub Desktop.
Date grouping pseudocode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
last_date_header = nil | |
# Items should be sorted by date already | |
for item in items | |
if last_date_header != item.date | |
# Output item.date | |
last_date_header = item.date | |
end | |
# Output item | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment