Created
February 2, 2020 00:42
-
-
Save shanelonergan/7f1fac5cb1c232ec5ed972aa808981f9 to your computer and use it in GitHub Desktop.
This file contains 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
unique_dates.reduce(today) do | memo, date | | |
yesterday = memo.yesterday.to_date | |
if date == yesterday || date == today | |
streak_count += 1 | |
memo = date | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment