Custom Ranges in Ruby
21-Apr-2022 1383
You need to generate an array of months between two arbitrary dates. Normally this sort of thing can be solved with a range but date ranges give you an entry for every day, not every month.You could generate all the days and then filter them such that you only keep one per month but that forces you to create a lot more data than you actually need. It also leaves you with an array of Date objects which don’t really represent the concept you are trying to work with.
Custom Ranges in Ruby #ruby #rubydeveloper #rubyonrails #Custom #Ranges https://rubyonrails.ba/link/custom-ranges-in-ruby