Created
November 17, 2017 12:41
-
-
Save msroot/d454555e67d521697dfee1ffde851f9c 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
#Generate yearly invoices template: | |
time = Time.now | |
_format =->(d) {d.strftime("%B %d, %Y") } | |
Array(1..12).map { |e| | |
date = time.change(month: e) | |
puts "From #{_format.call(date.beginning_of_month)} to #{_format.call(date.end_of_month)}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment