Last active
August 29, 2015 14:15
-
-
Save todashuta/10b06c2e0cd28ee83213 to your computer and use it in GitHub Desktop.
ある期間中の日曜日の数を数える written in Ruby
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
| # See: https://plus.google.com/103883213408660487064/posts/EmxndYMnSxm | |
| require 'date' | |
| puts (Date.new(1990,1,1)..Date.new(2015,2,11)).count(&:sunday?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment