fork download
  1. require 'date'
  2.  
  3. today = Date.today
  4. y, m = today.year, today.month
  5. r = (Date.new(y, m, 1) .. Date.new(y, m, -1)).to_a
  6.  
  7. # print strings
  8. p r.map(&:to_s)
Success #stdin #stdout 0.01s 8260KB
stdin
Standard input is empty
stdout
["2026-01-01", "2026-01-02", "2026-01-03", "2026-01-04", "2026-01-05", "2026-01-06", "2026-01-07", "2026-01-08", "2026-01-09", "2026-01-10", "2026-01-11", "2026-01-12", "2026-01-13", "2026-01-14", "2026-01-15", "2026-01-16", "2026-01-17", "2026-01-18", "2026-01-19", "2026-01-20", "2026-01-21", "2026-01-22", "2026-01-23", "2026-01-24", "2026-01-25", "2026-01-26", "2026-01-27", "2026-01-28", "2026-01-29", "2026-01-30", "2026-01-31"]