Days in Month

Get the number of days in a specific month.

Code

General
require 'date'
return Date.new(year, month, -1).day

Parameters

Year

Month (1-12)

Server

More Ruby Snippets