Skip to content

Instantly share code, notes, and snippets.

@mickey
Created November 4, 2009 23:33
Show Gist options
  • Save mickey/226507 to your computer and use it in GitHub Desktop.
Save mickey/226507 to your computer and use it in GitHub Desktop.
list = (Date.parse("2009-10-01") .. Date.parse("2009-10-30")).inject([]) do |sum, date|
if [1, 2].include? date.cwday #monday or tueday
sum << date
end
sum
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment